Skip to content

Commit

Permalink
Fixed error message in gen_inputbox
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed May 1, 2011
1 parent 773ee3b commit 97888a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripting/lua_utils.cpp
Expand Up @@ -359,13 +359,13 @@ static int gen_inputbox (lua_State *L, T & msg)
} // validate function there

} // table of extra stuff there

if (strlen (inputmsg) > 1000)
luaL_error (L, "inputbox message too long (max 1000 characters)");

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

if (sInputMsg.length () > 1000)
luaL_error (L, "inputbox message too long (max 1000 characters)");

if (strlen (inputtitle) > 100)
luaL_error (L, "inputbox title too long (max 100 characters)");

Expand Down

0 comments on commit 97888a3

Please sign in to comment.