fix non-POD varargs

Originally committed to SVN as r765.
This commit is contained in:
David Lamparter 2007-01-11 01:29:01 +00:00
parent 5108f81cc1
commit 6636b56a52
2 changed files with 3 additions and 3 deletions

View File

@ -391,12 +391,12 @@ namespace Automation4 {
// absolute path, do nothing
}
if (!fname.IsOk() || !fname.FileExists()) {
lua_pushfstring(L, "Could not find Lua script for inclusion: %s", fnames.mb_str(wxConvUTF8));
lua_pushfstring(L, "Could not find Lua script for inclusion: %s", fnames.mb_str(wxConvUTF8).data());
lua_error(L);
}
if (luaL_loadfile(L, fname.GetFullPath().mb_str(wxConvUTF8))) {
lua_pushfstring(L, "An error occurred loading the Lua script file \"%s\":\n\n%s", fname.GetFullPath().mb_str(wxConvUTF8), lua_tostring(L, -1));
lua_pushfstring(L, "An error occurred loading the Lua script file \"%s\":\n\n%s", fname.GetFullPath().mb_str(wxConvUTF8).data(), lua_tostring(L, -1));
lua_error(L);
return 0;
}

View File

@ -400,7 +400,7 @@ namespace Automation4 {
result = dia;
} else {
lua_pushfstring(L, "Found line with unknown class: %s", lclass.mb_str(wxConvUTF8));
lua_pushfstring(L, "Found line with unknown class: %s", lclass.mb_str(wxConvUTF8).data());
lua_error(L);
return 0;
}