From 8c6630706cc7737f5c507fd41ea74ec83d4e0ca4 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 6 Aug 2016 04:18:56 +0200 Subject: Another buildfix pt. 2 --- source/memmap.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'source') 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) -- cgit v1.2.3