Skip to content

Commit cc99188

Browse files
committed
fixes #139 (assertion on corrupt recent file path)
1 parent fed6596 commit cc99188

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

pc/shared/App_Settings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void App_Settings::save()
4141
std::stringstream row;
4242

4343
//sprintf( row, "### Preferences file V.%s for MeatBall V.0 #### \n\n", PREF_VERSION );
44-
row << "### Preferences file V." << PREF_VERSION << " for " << APP_NAME << " V.0 #### \n\n";
44+
row << "### Preferences file V." << PREF_VERSION << " for " << APP_NAME_VERSION << " #### \n\n";
4545
ofs.write( row.str().c_str(), row.str().length() );
4646
Utility::clearsstream(row);
4747

pc/shared/App_Settings.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "File_System.h"
77

88
/// Current Settings Revision
9-
#define PREF_VERSION "0.6"
9+
#define PREF_VERSION "0.6.1"
1010

1111
/// User Settings File
1212
#define USER_PREF_FILE_NAME "Preferences.ini"

pc/shared/Organization.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#define COMPANY_NAME "Black Hole Studios"
44
#define APP_NAME "SNES Tracker"
55
#define APP_VER_MAJOR 0
6-
#define APP_VER_MINOR 1
7-
#define APP_VER_MICRO 1
6+
#define APP_VER_MINOR 2
7+
#define APP_VER_MICRO 0
88
// concats the 3 version values into a string
99
#define APP_VER_STRING(maj, min, mic) #maj "." #min "." #mic
1010
// allows calling the above macro with macro arguments

pc/shared/RecentFiles.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,14 @@ void RecentFiles::createDisplayNames()
162162
if (paths[i] != NULL)
163163
{
164164
char *filename = (char *) Utility::getFileName(paths[i]);
165-
assert(filename != NULL);
165+
166+
// Fixes #139
167+
if (filename == NULL)
168+
{
169+
paths[i] = NULL;
170+
continue;
171+
}
172+
166173
dnames[i] = (char *) SDL_malloc( sizeof(char) * ( strlen(filename) + 1 + 1) );
167174
strcpy(dnames[i], FONT_BULLETPOINT_STR);
168175
strcat(dnames[i], filename);

0 commit comments

Comments
 (0)