summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-04-23 21:23:21 +0000
committerrubidium <rubidium@openttd.org>2014-04-23 21:23:21 +0000
commit21f991e2353d99064555acf7996b51c46bbd44a5 (patch)
tree98bcaf86aac6edddf70877a13a71b8337049254d /src/video
parent160ad31028c6d089ee9bc69581c9a25da00912aa (diff)
downloadopenttd-21f991e2353d99064555acf7996b51c46bbd44a5.tar.xz
(svn r26489) -Codechange: properly account for the end of buffers in the file io code instead of assuming MAX_PATH is okay
Diffstat (limited to 'src/video')
-rw-r--r--src/video/sdl_v.cpp2
1 files changed, 1 insertions, 1 deletions
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) {