** Read an integer numeral and raises an error if it is larger ** than the maximum size of integers. */
| 1468 | ** than the maximum size of integers. |
| 1469 | */ |
| 1470 | static unsigned getnumlimit (Header *h, const char **fmt, size_t df) { |
| 1471 | size_t sz = getnum(fmt, df); |
| 1472 | if (l_unlikely((sz - 1u) >= MAXINTSIZE)) |
| 1473 | return cast_uint(luaL_error(h->L, |
| 1474 | "integral size (%d) out of limits [1,%d]", sz, MAXINTSIZE)); |
| 1475 | return cast_uint(sz); |
| 1476 | } |
| 1477 | |
| 1478 | |
| 1479 | /* |
no test coverage detected