summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-arcade/smclone/files/smclone-0.95-use-HOME.patch')
-rw-r--r--games-arcade/smclone/files/smclone-0.95-use-HOME.patch50
1 files changed, 0 insertions, 50 deletions
diff --git a/games-arcade/smclone/files/smclone-0.95-use-HOME.patch b/games-arcade/smclone/files/smclone-0.95-use-HOME.patch
deleted file mode 100644
index 114ae3a49385..000000000000
--- a/games-arcade/smclone/files/smclone-0.95-use-HOME.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- savegame.cpp
-+++ savegame.cpp
-@@ -45,8 +45,8 @@
- loaded_save_info.OW_world = 0;
- loaded_save_info.itembox_item = 0;
-
-- char Full_Save_Name[40];
-- sprintf( Full_Save_Name, "%s/%d.sav", SAVE_DIR, Save_file );
-+ char Full_Save_Name[255];
-+ snprintf( Full_Save_Name, sizeof(Full_Save_Name) - 1, "%s/.smclone/%d.sav", getenv("HOME"), Save_file );
-
- ifstream ifs( Full_Save_Name, ios::in );
-
-@@ -79,8 +79,8 @@
-
- int cSavegame :: Save( unsigned int Save_file, Savegame Save_info )
- {
-- char Full_Save_Name[45];
-- sprintf( Full_Save_Name, "%s/%d.sav", SAVE_DIR, Save_file );
-+ char Full_Save_Name[255];
-+ snprintf( Full_Save_Name, sizeof(Full_Save_Name) - 1, "%s/.smclone/%d.sav", getenv("HOME"), Save_file );
-
- ifstream ifs( Full_Save_Name, ios::in );
-
-@@ -181,10 +181,11 @@
- char buffer[10];
- char desc_tmp[150];
-
-- Full_Save_Name = SAVE_DIR "/.sav";
-+ Full_Save_Name = "/.smclone/.sav";
-
- sprintf( buffer, "%d", Save_file );
-- Full_Save_Name.insert( strlen( SAVE_DIR ) + 1, buffer );
-+ Full_Save_Name.insert( strlen( "/.smclone/" ) + 1, buffer );
-+ Full_Save_Name.insert( 0, getenv("HOME") );
-
- if( !valid_file( Full_Save_Name ) )
- {
-@@ -235,9 +236,9 @@
-
- bool cSavegame :: is_valid( unsigned int Save_file )
- {
-- char savename[50];
-+ char savename[255];
-
-- sprintf( savename, "%s/%d.sav", SAVE_DIR, Save_file );
-+ snprintf( savename, sizeof(savename) - 1, "%s/.smclone/%d.sav", getenv("HOME"), Save_file );
-
- return valid_file( savename );
- }