Exception: Constructor now takes printf style arguments

This commit is contained in:
Jonas Kulla 2013-12-29 18:05:11 +01:00
parent 5b736bcfd6
commit 9759e52b3c
7 changed files with 20 additions and 30 deletions

View file

@ -275,9 +275,7 @@ runRMXPScripts(mrb_state *mrb, mrbc_context *ctx)
}
catch (const Exception &e)
{
char buffer[512];
snprintf(buffer, sizeof(buffer), e.fmt.c_str(), e.arg1.c_str(), e.arg2.c_str());
readError = std::string(": ") + std::string(buffer);
readError = std::string(": ") + e.msg;
}
SDL_RWclose(&ops);