Skip to content

Commit 97888a3

Browse files
committed
Fixed error message in gen_inputbox
1 parent 773ee3b commit 97888a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripting/lua_utils.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,13 +359,13 @@ static int gen_inputbox (lua_State *L, T & msg)
359359
} // validate function there
360360

361361
} // table of extra stuff there
362+
363+
if (strlen (inputmsg) > 1000)
364+
luaL_error (L, "inputbox message too long (max 1000 characters)");
362365

363366
// if we leave in & it will make the next letter underlined
364367
string sInputMsg = FindAndReplace (inputmsg, "&", "&&");
365368

366-
if (sInputMsg.length () > 1000)
367-
luaL_error (L, "inputbox message too long (max 1000 characters)");
368-
369369
if (strlen (inputtitle) > 100)
370370
luaL_error (L, "inputbox title too long (max 100 characters)");
371371

0 commit comments

Comments
 (0)