]> git.mxchange.org Git - flightgear.git/commitdiff
Oops, make sure that one of the default splash screens gets used when the splash...
authorehofman <ehofman>
Mon, 22 Dec 2003 21:59:43 +0000 (21:59 +0000)
committerehofman <ehofman>
Mon, 22 Dec 2003 21:59:43 +0000 (21:59 +0000)
src/Main/splash.cxx

index f0af0a0dff17610593d7bff540dcfd33f3a80b7c..e83506fb7223acf8d30a538c66ff1e241cf5ccb6 100644 (file)
@@ -58,11 +58,11 @@ void fgSplashInit ( const char *splash_texture ) {
     splash.bind();
 
     SGPath tpath( globals->get_fg_root() );
-    if (splash_texture == NULL) {
+    if (splash_texture == NULL || !strcmp(splash_texture, "")) {
         // load in the texture data
         int num = (int)(sg_random() * 5.0 + 1.0);
-        char num_str[256];
-        sprintf(num_str, "%d", num);
+        char num_str[5];
+        snprintf(num_str, 4, "%d", num);
 
         tpath.append( "Textures/Splash" );
         tpath.concat( num_str );