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

Function readInt4

source/patch.cpp:50–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50static s64 readInt4(MFILE *f) {
51 s64 tmp, res = 0;
52 int c;
53
54 for (int i = 0; i < 4; i++) {
55 c = memfgetc(f);
56 if (c == MEOF)
57 return -1;
58 tmp = c;
59 res = res + (tmp << (i * 8));
60 }
61
62 return res;
63}
64
65static s64 readVarPtr(MFILE *f) {
66 s64 offset = 0, shift = 1;

Callers 1

patchApplyUPSFunction · 0.85

Calls 1

memfgetcFunction · 0.85

Tested by

no test coverage detected