SizeOfImage fix from SoullessSentinel. Thanks.
This commit is contained in:
parent
f2fd7cfbc7
commit
ae824a92f6
|
@ -323,12 +323,25 @@ void Exe::Export(const char *x_szExeFilename)
|
|||
goto cleanup;
|
||||
}
|
||||
|
||||
fflush(ExeFile);
|
||||
|
||||
printf("OK\n");
|
||||
}
|
||||
}
|
||||
|
||||
// Write correct SizeOfImage
|
||||
{
|
||||
printf("Exe::Exe: Writing Image Size...\n");
|
||||
int currentSize = ftell(ExeFile);
|
||||
|
||||
// Seek to offset of File Size
|
||||
fseek(ExeFile, 0x108, SEEK_SET);
|
||||
// Write calculated size
|
||||
fwrite(¤tSize, sizeof(int), 1, ExeFile);
|
||||
|
||||
printf("OK\n");
|
||||
}
|
||||
|
||||
fflush(ExeFile);
|
||||
|
||||
cleanup:
|
||||
|
||||
if(GetError() != 0)
|
||||
|
|
Loading…
Reference in New Issue