diff --git a/crc32.cpp b/crc32.cpp index 3abeca3..14bc4f0 100644 --- a/crc32.cpp +++ b/crc32.cpp @@ -19,8 +19,3 @@ uint32_t crc32_update(const uint8_t* data, size_t len, uint32_t crc) } return ~crc; } - -uint32_t crc32(const uint8_t* data, size_t len) -{ - return crc32_update(data, len, 0); -} diff --git a/crc32.h b/crc32.h index e5fb5a7..9a28542 100644 --- a/crc32.h +++ b/crc32.h @@ -6,5 +6,5 @@ #include #include -uint32_t crc32(const uint8_t* data, size_t len); uint32_t crc32_update(const uint8_t* data, size_t len, uint32_t crc); +static inline uint32_t crc32(const uint8_t* data, size_t len) { return crc32_update(data, len, 0); } diff --git a/flips.cpp b/flips.cpp index caa3377..296e0da 100644 --- a/flips.cpp +++ b/flips.cpp @@ -1,9 +1,10 @@ //Module name: Floating IPS, shared core for all frontends //Author: Alcaro -//Date: June 18, 2015 +//Date: See Git history //Licence: GPL v3.0 or higher #include "flips.h" +#include "crc32.h" //get rid of dependencies on libstdc++, they eat 200KB on Windows void* operator new(size_t n) { return malloc(n); } // forget allocation failures, let them segfault. @@ -190,7 +191,6 @@ static const uint8_t checkmap_sum_size_max = 4; static LPCWSTR FindRomForSum(int type, void* sum) { -//printf("SE.CRC=%.8X\n",*(uint32_t*)sum); for (unsigned int i=0;irequired && errinf.level==el_ok) errinf=error(el_warning, "The patch was applied, but there was no manifest present."); + else if (manifestinfo->required && errinf.level==el_ok) + { + errinf=error(el_warning, "The patch was applied, but there was no manifest present."); + } } if (removeheader) @@ -405,7 +407,10 @@ struct errorinfo ApplyPatchMem2(file* patch, struct mem inrom, bool verifyinput, inrom.len+=512; if (errinf.level