Fix buffer overflow on GsLoadFont

LoadImage accesses img[0..15] when w=16, h=1, causing it to read past `pal`.
This commit is contained in:
Xavier Del Campo Romero 2020-11-07 16:00:08 +01:00
parent d9acf265ff
commit d3780c0d7d
1 changed files with 1 additions and 1 deletions

View File

@ -1045,7 +1045,7 @@ void GsSetDispEnvSimple(int x, int y)
void GsLoadFont(int fb_x, int fb_y, int cx, int cy)
{
unsigned short pal[2] = {0x0, 0x7fff};
const unsigned short pal[16] = {0x0, 0x7fff};
LoadImage(psxsdk_font_data, fb_x, fb_y, 16, 128);
while(GsIsDrawing());