(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:
rubidium
2014-04-23 21:23:21 +00:00
parent 160ad31028
commit 21f991e235
10 changed files with 95 additions and 88 deletions

View File

@@ -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) {