From 22b5b1c405f711a1c706eda267fcf66f351137a4 Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 22 Dec 2003 21:59:43 +0000 Subject: [PATCH] Oops, make sure that one of the default splash screens gets used when the splash-texture is undefined --- src/Main/splash.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Main/splash.cxx b/src/Main/splash.cxx index f0af0a0df..e83506fb7 100644 --- a/src/Main/splash.cxx +++ b/src/Main/splash.cxx @@ -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 ); -- 2.39.5