From 3a81663d45d5dd171330735a89b8efcbd3156ac5 Mon Sep 17 00:00:00 2001 From: ame Date: Mon, 4 Dec 2023 01:19:57 -0600 Subject: fix the uh --- io.lua | 2 +- src/io.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/io.lua b/io.lua index fd58bab..6456ef1 100644 --- a/io.lua +++ b/io.lua @@ -1,2 +1,2 @@ require "llib" -print(llib.io.readfile("../personal-site/src/window-utils.js")) +print(llib.io.readfile("../aoc2023/src/1.input")) diff --git a/src/io.c b/src/io.c index f2a5c82..3f2922c 100644 --- a/src/io.c +++ b/src/io.c @@ -28,6 +28,7 @@ int l_readfile(lua_State* L){ out[count] = ch; count++; } + out[count] = '\0'; lua_pushstring(L, out); free(out); -- cgit v1.2.3