From 5ddb5fff943f8992a2e96f0fe13b7e25f24b66e6 Mon Sep 17 00:00:00 2001 From: Allanis Date: Thu, 22 Aug 2013 18:22:18 +0100 Subject: [PATCH] [Fix] Bug introduced by assert in WARN/ERR change. --- src/ai.c | 7 ++++--- src/music.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/ai.c b/src/ai.c index aae8f2f..dda9cef 100644 --- a/src/ai.c +++ b/src/ai.c @@ -296,9 +296,10 @@ static int ai_loadProfile(char* filename) { /* Now load the file, since all the functions have been previously loaded. */ buf = pack_readfile(DATA, filename, &bufsize); if(luaL_dobuffer(L, buf, bufsize, filename) != 0) { - ERR("loading AI file: %s", filename); - ERR("%s", lua_tostring(L, -1)); - WARN("Most likely Lua file has improper syntax, please check it."); + ERR("Error loading AI file: %s\n" + "%s\n" + "Most likely Lua file has improper syntax, please check.", + filename, lua_tostring(L, -1)); return -1; } diff --git a/src/music.c b/src/music.c index 4706871..99828d6 100644 --- a/src/music.c +++ b/src/music.c @@ -384,9 +384,10 @@ static int music_luaInit(void) { /* Load the actual lua music code. */ buf = pack_readfile(DATA, MUSIC_LUA_PATH, &bufsize); if(luaL_dobuffer(music_lua, buf, bufsize, MUSIC_LUA_PATH) != 0) { - ERR("Error loading music file: %s" MUSIC_LUA_PATH); - ERR("%s", lua_tostring(music_lua, -1)); - WARN("Most likely lua file has improper syntax, please check"); + ERR("Error loading music file: %s\n" + "%s\n" + "Most likely Lua file has improper syntax, please check", + MUSIC_LUA_PATH, lua_tostring(music_lua, -1)); return -1; } free(buf);