Fix buffer overflow when reading string from R_TextureNameForNum into Lua Closes #1341 See merge request !2582