crash with fwrite function in saveprogress()

This commit is contained in:
Sylvain PILLOT 2023-02-02 22:17:26 +01:00
parent eb16097722
commit c331fff878
1 changed files with 4 additions and 4 deletions

View File

@ -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 );