Skip to content
Snippets Groups Projects
Commit f406e9bb authored by LJ Sonic's avatar LJ Sonic
Browse files

Throw a Lua error when R_Frame2Char is called with a frame number without character representation

parent 49fa4503
No related branches found
No related tags found
1 merge request!2394Sprite names up to 64 character long and 256 frames per sprite
......@@ -3030,6 +3030,9 @@ static int lib_rFrame2Char(lua_State *L)
//HUDSAFE
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;
lua_pushstring(L, c);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment