MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / loadUnsigned

Function loadUnsigned

extlibs/lua/src/lundump.c:69–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68
69static size_t loadUnsigned (LoadState *S, size_t limit) {
70 size_t x = 0;
71 int b;
72 limit >>= 7;
73 do {
74 b = loadByte(S);
75 if (x >= limit)
76 error(S, "integer overflow");
77 x = (x << 7) | (b & 0x7f);
78 } while ((b & 0x80) == 0);
79 return x;
80}
81
82
83static size_t loadSize (LoadState *S) {

Callers 2

loadSizeFunction · 0.85
loadIntFunction · 0.85

Calls 2

loadByteFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected