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

Function LoadCode

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

Source from the content-addressed store, hash-verified

111// 500M
112const int g_sizelimit = 1024 * 1024 * 500;
113static bool LoadCode(LoadState *S, Proto *f) {
114 int n = LoadInt(S);
115 if (n > g_sizelimit)
116 {
117 return false;
118 }
119
120 f->code = luaM_newvector(S->L, n, Instruction);
121 f->sizecode = n;
122 LoadVector(S, f->code, n);
123 return true;
124}
125
126
127static void LoadFunction(LoadState *S, Proto *f, TString *psource);

Callers 1

LoadFunctionFunction · 0.85

Calls 1

LoadIntFunction · 0.85

Tested by

no test coverage detected