Fix tpt.message_box correctly to only accept true/false third arg.

This commit is contained in:
cracker64 2013-05-09 15:51:01 -04:00
parent 67e1213905
commit 4c5667fbc6

View File

@ -1739,7 +1739,7 @@ int luatpt_message_box(lua_State* l)
{ {
std::string title = std::string(luaL_optstring(l, 1, "Title")); std::string title = std::string(luaL_optstring(l, 1, "Title"));
std::string message = std::string(luaL_optstring(l, 2, "Message")); std::string message = std::string(luaL_optstring(l, 2, "Message"));
int large = luaL_optint(l, 3, 0); int large = lua_isboolean(l, 3)?lua_toboolean(l, 3):0;
new InformationMessage(title, message, large); new InformationMessage(title, message, large);
return 0; return 0;
} }