MCPcopy Create free account
hub / github.com/dborth/fceugx / computePatchCRC

Function computePatchCRC

source/patch.cpp:84–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82#endif
83
84static uLong computePatchCRC(MFILE *f, unsigned int size) {
85 Bytef buf[4096];
86 long readed;
87
88 uLong crc = crc32(0L, Z_NULL, 0);
89 do {
90 readed = memfread(buf, 1, MIN(size, sizeof(buf)), f);
91 crc = crc32(crc, buf, readed);
92 size -= readed;
93 } while (readed > 0);
94
95 return crc;
96}
97
98bool patchApplyIPS(MFILE * f, u8 **r, int *s) {
99 // from the IPS spec at http://zerosoft.zophar.net/ips.htm

Callers 1

patchApplyUPSFunction · 0.85

Calls 1

memfreadFunction · 0.85

Tested by

no test coverage detected