CxbxCreatePartitionHeaderFile : Prevent NULL-pointer error

This commit is contained in:
PatrickvL 2017-11-20 11:47:45 +01:00
parent f519674873
commit ccd0fe6791
1 changed files with 2 additions and 1 deletions

View File

@ -100,7 +100,8 @@ void CxbxCreatePartitionHeaderFile(std::string filename, bool partition0 = false
// If this is partition 0, install the partiton table
if (partition0) {
WriteFile(hf, &BackupPartTbl, sizeof(XboxPartitionTable), NULL, 0);
DWORD NumberOfBytesWritten = 0;
WriteFile(hf, &BackupPartTbl, sizeof(XboxPartitionTable), &NumberOfBytesWritten, 0);
}
SetFilePointer(hf, 512 * ONE_KB, 0, FILE_BEGIN);