lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

There is a small bug in the limit size for constructors. The limit in
the code is (much) smaller than the real limit. The result is that
very large constructors (more than 2^18 entries) that should work are
rejected by the parser.  The patch is this:

* lparser.c:

 static void listfield (LexState *ls, struct ConsControl *cc) {
   expr(ls, &cc->v);
-  luaY_checklimit(ls->fs, cc->na, MAXARG_Bx, "items in a constructor");
+  luaY_checklimit(ls->fs, cc->na, MAX_INT, "items in a constructor");

-- Roberto