MCPcopy Create free account
hub / github.com/DFHack/dfhack / getnumlimit

Function getnumlimit

depends/lua/src/lstrlib.c:1199–1205  ·  view source on GitHub ↗

** Read an integer numeral and raises an error if it is larger ** than the maximum size for integers. */

Source from the content-addressed store, hash-verified

1197** than the maximum size for integers.
1198*/
1199static int getnumlimit (Header *h, const char **fmt, int df) {
1200 int sz = getnum(fmt, df);
1201 if (sz > MAXINTSIZE || sz <= 0)
1202 return luaL_error(h->L, "integral size (%d) out of limits [1,%d]",
1203 sz, MAXINTSIZE);
1204 return sz;
1205}
1206
1207
1208/*

Callers 1

getoptionFunction · 0.85

Calls 2

getnumFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected