fixed handling of R'n'D program filenames with suffix
authorHolger Schemel <info@artsoft.org>
Fri, 13 Nov 2015 20:44:08 +0000 (21:44 +0100)
committerHolger Schemel <info@artsoft.org>
Fri, 13 Nov 2015 20:44:08 +0000 (21:44 +0100)
src/main.c

index 6f1559b5e3d6241cc6231957a8bf400caa7c750a..44f6f3bea3a398bbcdc1317a97766ec502784143 100644 (file)
@@ -5645,7 +5645,7 @@ static void InitProgramConfig(char *command_filename)
     userdata_basename = getBaseName(config_filename);
 
     if (strSuffix(userdata_basename, ".conf"))
-      userdata_basename[strlen(userdata_basename) - 4] = '\0';
+      userdata_basename[strlen(userdata_basename) - 5] = '\0';
 
     LoadSetupFromFilename(config_filename);
   }