mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Throw a Lua error when R_Frame2Char is called with a frame number without character representation
This commit is contained in:
parent
49fa45039e
commit
f406e9bbb5
1 changed files with 3 additions and 0 deletions
|
@ -3030,6 +3030,9 @@ static int lib_rFrame2Char(lua_State *L)
|
||||||
//HUDSAFE
|
//HUDSAFE
|
||||||
|
|
||||||
c[0] = R_Frame2Char(ch);
|
c[0] = R_Frame2Char(ch);
|
||||||
|
if (c[0] == '\xFF')
|
||||||
|
return luaL_error(L, "frame %u cannot be represented by a character", ch);
|
||||||
|
|
||||||
c[1] = 0;
|
c[1] = 0;
|
||||||
|
|
||||||
lua_pushstring(L, c);
|
lua_pushstring(L, c);
|
||||||
|
|
Loading…
Reference in a new issue