diff --git a/similar/main/playsave.cpp b/similar/main/playsave.cpp index 8fd257bd7..2abb0a451 100644 --- a/similar/main/playsave.cpp +++ b/similar/main/playsave.cpp @@ -1002,10 +1002,10 @@ int read_player_file() #elif defined(DXX_BUILD_DESCENT_II) if (player_file_version>=20) PHYSFS_seek( file, PHYSFS_tell(file)+(sizeof(ubyte)*MAX_CONTROLS) ); // Skip obsolete Winjoy map field - ubyte control_type_dos, control_type_win; - if (PHYSFS_read(file, reinterpret_cast(&control_type_dos), sizeof(ubyte), 1) != 1) + uint8_t control_type_dos, control_type_win; + if (PHYSFS_read(file, &control_type_dos, sizeof(ubyte), 1) != 1) goto read_player_file_failed; - else if (player_file_version >= 21 && PHYSFS_read(file, reinterpret_cast(&control_type_win), sizeof(ubyte), 1) != 1) + else if (player_file_version >= 21 && PHYSFS_read(file, &control_type_win, sizeof(ubyte), 1) != 1) #endif goto read_player_file_failed; else if (PHYSFS_read(file, &dummy_joy_sens, sizeof(ubyte), 1) !=1 )