diff options
| author | Roberto I <roberto@inf.puc-rio.br> | 2025-08-27 10:30:54 -0300 |
|---|---|---|
| committer | Roberto I <roberto@inf.puc-rio.br> | 2025-08-27 10:30:54 -0300 |
| commit | f87416f1a3e47aa69ed8d27e7406ec6b7848da9a (patch) | |
| tree | 223c07bf1f2c39ca692f74015b52b8670eb6ad52 /lvm.c | |
| parent | 03a3473687ef0df86fc6d31de7d46158a0436666 (diff) | |
| download | lua-f87416f1a3e47aa69ed8d27e7406ec6b7848da9a.tar.gz lua-f87416f1a3e47aa69ed8d27e7406ec6b7848da9a.tar.bz2 lua-f87416f1a3e47aa69ed8d27e7406ec6b7848da9a.zip | |
Added limit to number of elements in a constructor
The reasoning in commit 519c57d5 is wrong: A sequence of nils generates
several fields with just one OP_LOADNIL.
Diffstat (limited to '')
| -rw-r--r-- | lvm.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -1888,7 +1888,7 @@ void luaV_execute (lua_State *L, CallInfo *ci) { | |||
| 1888 | vmcase(OP_SETLIST) { | 1888 | vmcase(OP_SETLIST) { |
| 1889 | StkId ra = RA(i); | 1889 | StkId ra = RA(i); |
| 1890 | unsigned n = cast_uint(GETARG_vB(i)); | 1890 | unsigned n = cast_uint(GETARG_vB(i)); |
| 1891 | unsigned int last = cast_uint(GETARG_vC(i)); | 1891 | unsigned last = cast_uint(GETARG_vC(i)); |
| 1892 | Table *h = hvalue(s2v(ra)); | 1892 | Table *h = hvalue(s2v(ra)); |
| 1893 | if (n == 0) | 1893 | if (n == 0) |
| 1894 | n = cast_uint(L->top.p - ra) - 1; /* get up to the top */ | 1894 | n = cast_uint(L->top.p - ra) - 1; /* get up to the top */ |
