(svn r26489) -Codechange: properly account for the end of buffers in the file io code instead of assuming MAX_PATH is okay
This commit is contained in:
@@ -282,7 +282,7 @@ bool VideoDriver_SDL::CreateMainSurface(uint w, uint h)
|
||||
if (bpp == 0) usererror("Can't use a blitter that blits 0 bpp for normal visuals");
|
||||
|
||||
char icon_path[MAX_PATH];
|
||||
if (FioFindFullPath(icon_path, lengthof(icon_path), BASESET_DIR, "openttd.32.bmp") != NULL) {
|
||||
if (FioFindFullPath(icon_path, lastof(icon_path), BASESET_DIR, "openttd.32.bmp") != NULL) {
|
||||
/* Give the application an icon */
|
||||
icon = SDL_CALL SDL_LoadBMP(icon_path);
|
||||
if (icon != NULL) {
|
||||
|
Reference in New Issue
Block a user