projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20001210-2-src
[rocksndiamonds.git]
/
src
/
libgame
/
system.c
diff --git
a/src/libgame/system.c
b/src/libgame/system.c
index 8a5feabea7f532cc343c83acc8e1661b72f14c87..5217460d47f80ed11a9dc3dcb4b14b7de09790cf 100644
(file)
--- a/
src/libgame/system.c
+++ b/
src/libgame/system.c
@@
-555,10
+555,8
@@
inline boolean ChangeVideoModeIfNeeded(boolean fullscreen)
Bitmap *LoadImage(char *basename)
{
Bitmap *new_bitmap;
Bitmap *LoadImage(char *basename)
{
Bitmap *new_bitmap;
- char filename[256];
-
- sprintf(filename, "%s/%s/%s",
- options.ro_base_directory, GRAPHICS_DIRECTORY, basename);
+ char *filename = getPath3(options.ro_base_directory, GRAPHICS_DIRECTORY,
+ basename);
#if defined(TARGET_SDL)
new_bitmap = SDLLoadImage(filename);
#if defined(TARGET_SDL)
new_bitmap = SDLLoadImage(filename);
@@
-566,6
+564,8
@@
Bitmap *LoadImage(char *basename)
new_bitmap = X11LoadImage(filename);
#endif
new_bitmap = X11LoadImage(filename);
#endif
+ free(filename);
+
return new_bitmap;
}
return new_bitmap;
}