** Read an integer numeral and raises an error if it is larger ** than the maximum size for integers. */
| 1197 | ** than the maximum size for integers. |
| 1198 | */ |
| 1199 | static 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 | /* |
no test coverage detected