wslua: Improve syntax error message

The filename is included in the error message from Lua so we don't
need to display this twice.

Change-Id: I00aa7255ff24b07b9f45a8e814a97b61c35936e1
Reviewed-on: https://code.wireshark.org/review/31768
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
Stig Bjørlykke 2019-01-28 09:09:08 +01:00
parent 21cbfef532
commit 8b684769a8
1 changed files with 3 additions and 3 deletions

View File

@ -567,15 +567,15 @@ static gboolean lua_load_script(const gchar* filename, const gchar* dirname, con
break;
case LUA_ERRSYNTAX:
report_failure("Lua: syntax error during precompilation of `%s':\n%s",filename,lua_tostring(L,-1));
report_failure("Lua: syntax error: %s", lua_tostring(L, -1));
break;
case LUA_ERRMEM:
report_failure("Lua: memory allocation error during precompilation of %s",filename);
report_failure("Lua: memory allocation error during precompilation of %s", filename);
break;
default:
report_failure("Lua: unknown error during precompilation of %s: %d",filename,error);
report_failure("Lua: unknown error during precompilation of %s: %d", filename, error);
break;
}
fclose(file);