aboutsummaryrefslogtreecommitdiff
path: root/src/io.c
diff options
context:
space:
mode:
authorame <[email protected]>2024-02-01 15:57:48 -0600
committerame <[email protected]>2024-02-01 15:57:48 -0600
commit741d7034818aa3f9328b9c558489a3541871a346 (patch)
treec2ed0df011a1a07e226679f1121646bba0c09989 /src/io.c
parent1b459e523badaa51cf249390f4b407130e1037fb (diff)
multiple function and globals soon maybe
Diffstat (limited to 'src/io.c')
-rw-r--r--src/io.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/io.c b/src/io.c
index 4a0fc93..14117ec 100644
--- a/src/io.c
+++ b/src/io.c
@@ -125,7 +125,11 @@ void i_pprint(lua_State* L, int indent, int skip_indent){
break;
case LUA_TSTRING:
if(!skip_indent) print_indentation(indent);
- printf("\"%s\"", lua_tostring(L,-1));
+ size_t len;
+ char* wowa = (char*)luaL_tolstring(L, -1, &len);
+ printf("\"");
+ for(int i = 0; i != len; i++) printf("%c",wowa[i]);
+ printf("\"");
break;
case LUA_TFUNCTION:
if(!skip_indent) print_indentation(indent);