From 21f991e2353d99064555acf7996b51c46bbd44a5 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 23 Apr 2014 21:23:21 +0000 Subject: (svn r26489) -Codechange: properly account for the end of buffers in the file io code instead of assuming MAX_PATH is okay --- src/video/sdl_v.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video') diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp index 6ec5269d5..9b1dd727f 100644 --- a/src/video/sdl_v.cpp +++ b/src/video/sdl_v.cpp @@ -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) { -- cgit v1.2.3-70-g09d2