diff options
author | twinaphex | 2016-08-06 04:18:56 +0200 |
---|---|---|
committer | twinaphex | 2016-08-06 04:18:56 +0200 |
commit | 8c6630706cc7737f5c507fd41ea74ec83d4e0ca4 (patch) | |
tree | 65cf7e39bceaa92fc635f29967a8b5b57e80ec4d /source | |
parent | 111959dd794349e641ea819f99bf65fe84ee3919 (diff) | |
download | snesemu-8c6630706cc7737f5c507fd41ea74ec83d4e0ca4.tar.gz snesemu-8c6630706cc7737f5c507fd41ea74ec83d4e0ca4.tar.bz2 snesemu-8c6630706cc7737f5c507fd41ea74ec83d4e0ca4.zip |
Another buildfix pt. 2
Diffstat (limited to 'source')
-rw-r--r-- | source/memmap.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/source/memmap.c b/source/memmap.c index e4e86d9..9ca41fc 100644 --- a/source/memmap.c +++ b/source/memmap.c @@ -574,6 +574,21 @@ void FreeSDD1Data() } #ifndef LOAD_FROM_MEMORY_TEST + +/* Read variable size MSB int from a file */ +static long ReadInt(FILE* f, unsigned nbytes) +{ + long v = 0; + while (nbytes--) + { + int c = fgetc(f); + if (c == EOF) + return -1; + v = (v << 8) | (c & 0xFF); + } + return (v); +} + #define IPS_EOF 0x00454F46l static void CheckForIPSPatch(const char* rom_filename, bool header, @@ -4127,19 +4142,6 @@ void ApplyROMFixes() //BNE } -// Read variable size MSB int from a file -static long ReadInt(FILE* f, unsigned nbytes) -{ - long v = 0; - while (nbytes--) - { - int c = fgetc(f); - if (c == EOF) - return -1; - v = (v << 8) | (c & 0xFF); - } - return (v); -} int is_bsx(unsigned char* p) |