From df4ce7ba141082093f791a2d0bf417690ec37b5e Mon Sep 17 00:00:00 2001 From: Firew0lf Date: Wed, 19 Aug 2015 17:41:53 +0200 Subject: [PATCH] Enhanced the error message for "luaL_dofile(L, BOOTFILE)" --- source/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/main.c b/source/main.c index e5a8b4e..cadec6d 100644 --- a/source/main.c +++ b/source/main.c @@ -12,7 +12,7 @@ int load_ctr_lib(lua_State *L); void unload_font_lib(); // Display an error -void error(char *error) { +void error(const char *error) { gfxInitDefault(); consoleInit(GFX_TOP, NULL); @@ -46,7 +46,7 @@ int main() { load_ctr_lib(L); // Do the actual thing - if (luaL_dofile(L, BOOT_FILE)) error("Can't open the boot file "BOOT_FILE); + if (luaL_dofile(L, BOOT_FILE)) error(luaL_checkstring(L, -1)); // Unload current font unload_font_lib();