MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / LoadUpvalues

Function LoadUpvalues

src/Chain/libraries/glua/lundump.cpp:192–210  ·  view source on GitHub ↗

500M

Source from the content-addressed store, hash-verified

190
191// 500M
192static bool LoadUpvalues(LoadState *S, Proto *f) {
193 int i, n;
194 n = LoadInt(S);
195 if (n > g_sizelimit)
196 {
197 return false;
198 }
199
200 f->upvalues = luaM_newvector(S->L, n, Upvaldesc);
201 f->sizeupvalues = n;
202 for (i = 0; i < n; i++)
203 f->upvalues[i].name = nullptr;
204 for (i = 0; i < n; i++) {
205 f->upvalues[i].instack = LoadByte(S);
206 f->upvalues[i].idx = LoadByte(S);
207 }
208
209 return true;
210}
211
212// 500M
213const int g_lineslimit = 1024 * 1024 * 500;

Callers 1

LoadFunctionFunction · 0.85

Calls 2

LoadIntFunction · 0.85
LoadByteFunction · 0.85

Tested by

no test coverage detected