diff options
author | daurnimator <quae@daurnimator.com> | 2017-05-22 18:47:19 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-05-22 18:47:19 +1000 |
commit | 5b764695bdc939784fd448fe6ba16ed3a9f44b19 (patch) | |
tree | d095d6680d426791b02c64beda7ad35841d5f1ed /src/ldo.js | |
parent | a021614ebb948f218156cb38c4f441af904aa8c1 (diff) | |
download | fengari-5b764695bdc939784fd448fe6ba16ed3a9f44b19.tar.gz fengari-5b764695bdc939784fd448fe6ba16ed3a9f44b19.tar.bz2 fengari-5b764695bdc939784fd448fe6ba16ed3a9f44b19.zip |
src/ldo.js: Add assert to luaD_reallocstack from C sources
Diffstat (limited to 'src/ldo.js')
-rw-r--r-- | src/ldo.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; }; |