summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ldo.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ldo.js b/src/ldo.js
index 7154a7f..83f26cf 100644
--- a/src/ldo.js
+++ b/src/ldo.js
@@ -42,6 +42,8 @@ const seterrorobj = function(L, errcode, oldtop) {
const ERRORSTACKSIZE = luaconf.LUAI_MAXSTACK + 200;
const luaD_reallocstack = function(L, newsize) {
+ assert(newsize <= luaconf.LUAI_MAXSTACK || newsize == ERRORSTACKSIZE);
+ assert(L.stack_last == L.stack.length - lstate.EXTRA_STACK);
L.stack.length = newsize;
L.stack_last = newsize - lstate.EXTRA_STACK;
};