about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-02-10 16:40:40 -0800
committerKartik K. Agaram <vc@akkartik.com>2022-02-10 16:40:40 -0800
commitfeb10708ae302e3ea7a8b2d2c137f5580e56ef85 (patch)
treed263291dff978ffcc5e8fa6aa7be4bd102f6e6f9 /src
parentc1e4b84222f0a5fa3834b74a000ee5ab904708c1 (diff)
downloadteliva-feb10708ae302e3ea7a8b2d2c137f5580e56ef85.tar.gz
hacky support for caller main in file permissions
Diffstat (limited to 'src')
-rw-r--r--src/teliva.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/teliva.c b/src/teliva.c
index fd8d105..a430676 100644
--- a/src/teliva.c
+++ b/src/teliva.c
@@ -333,6 +333,8 @@ char* caller(lua_State* L) {
   memset(result, '\0', 1024);
   if (ar.name)
     strncpy(result, ar.name, 1020);
+  else  /* TODO: distinguish functions called from C */
+    strncpy(result, "main", 1020);
   return result;
 }