File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ void config_init(void)
161161 const char * root_path = NULL ;
162162
163163 if (check_portable ())
164- root_path = SDL_GetBasePath ();
164+ root_path = SDL_strdup ( SDL_GetBasePath () );
165165 else
166166 root_path = SDL_GetPrefPath (" Geardome" , GG_TITLE);
167167
@@ -780,16 +780,15 @@ static bool check_portable(void)
780780{
781781 const char * base_path;
782782 char portable_file_path[260 ];
783-
783+
784784 base_path = SDL_GetBasePath ();
785785 if (base_path == NULL )
786786 return false ;
787-
787+
788788 snprintf (portable_file_path, sizeof (portable_file_path), " %sportable.ini" , base_path);
789- SDL_free ((void *)base_path);
790789
791790 FILE* file = fopen_utf8 (portable_file_path, " r" );
792-
791+
793792 if (IsValidPointer (file))
794793 {
795794 fclose (file);
You can’t perform that action at this time.
0 commit comments