Merge pull request #8 from bl0ckeduser/patch-1

Make Microsoft-specific enum code more portable
This commit is contained in:
OV2 2011-11-15 15:56:38 -08:00
commit ca13eb017c
1 changed files with 2 additions and 2 deletions

View File

@ -3897,7 +3897,7 @@ static bool8 ReadBPSPatch (Reader *r, long, int32 &rom_size)
if(target_size > CMemory::MAX_ROM_SIZE) { delete[] data; return false; } //applying this patch will overflow Memory.ROM buffer
enum : uint32 { SourceRead, TargetRead, SourceCopy, TargetCopy };
enum { SourceRead, TargetRead, SourceCopy, TargetCopy };
uint32 outputOffset = 0, sourceRelativeOffset = 0, targetRelativeOffset = 0;
uint8 *patched_rom = new uint8[target_size];
@ -3908,7 +3908,7 @@ static bool8 ReadBPSPatch (Reader *r, long, int32 &rom_size)
uint32 mode = length & 3;
length = (length >> 2) + 1;
switch(mode) {
switch((int)mode) {
case SourceRead:
while(length--) patched_rom[outputOffset++] = Memory.ROM[outputOffset];
break;