crash with fwrite function in saveprogress()
This commit is contained in:
parent
eb16097722
commit
c331fff878
|
@ -33,7 +33,7 @@ void saveprogress( void )
|
|||
{
|
||||
sizeoffile = sizeof( HallOfFame );
|
||||
|
||||
FILE *file = fopen( filepath, "wb" );
|
||||
FILE *file = fopen( filepath, "w" );
|
||||
fwrite( HallOfFame, sizeoffile, 1, file );
|
||||
|
||||
fclose( file );
|
||||
|
@ -44,7 +44,7 @@ void loadprogress( void )
|
|||
{
|
||||
sizeoffile = sizeof( HallOfFame );
|
||||
|
||||
FILE *file = fopen( filepath, "rb" );
|
||||
FILE *file = fopen( filepath, "r" );
|
||||
fread( HallOfFame, sizeoffile, 1, file );
|
||||
|
||||
fclose( file );
|
||||
|
@ -70,7 +70,7 @@ void saveparameters( void )
|
|||
{
|
||||
sizeoffile = sizeof( PlayerPara );
|
||||
|
||||
FILE *file = fopen( filepara, "wb" );
|
||||
FILE *file = fopen( filepara, "w" );
|
||||
fwrite( PlayerPara, sizeoffile, 1, file );
|
||||
|
||||
fclose( file );
|
||||
|
@ -81,7 +81,7 @@ void loadparameters( void )
|
|||
{
|
||||
sizeoffile = sizeof( PlayerPara );
|
||||
|
||||
FILE *file = fopen( filepara, "rb" );
|
||||
FILE *file = fopen( filepara, "r" );
|
||||
fread( PlayerPara, sizeoffile, 1, file );
|
||||
|
||||
fclose( file );
|
||||
|
|
Loading…
Reference in New Issue