Skip to content

Commit e7f97f4

Browse files
committed
Fix load() error caused by #1777 fix (fix #2366)
1 parent a3da8f7 commit e7f97f4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/jsvar.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ static JsVarRef jsvInitJsVars(JsVarRef start, unsigned int count) {
323323

324324
void jsvInit(unsigned int size) {
325325
#ifdef RESIZABLE_JSVARS
326-
assert(size==0);
326+
// ignore size here - we're always going to start off at our smallest size
327+
NOT_USED(size);
327328
jsVarsSize = JSVAR_BLOCK_SIZE;
328329
jsVarBlocks = malloc(sizeof(JsVar*)); // just 1
329330
#if defined(ESPR_JIT) && defined(LINUX)
@@ -343,7 +344,7 @@ void jsvInit(unsigned int size) {
343344
if(!jsVars) jsVars = (JsVar *)malloc(sizeof(JsVar) * jsVarsSize);
344345
#endif
345346
#else
346-
assert(size==0);
347+
assert(size==JSVAR_CACHE_SIZE);
347348
#endif
348349

349350
jsVarFirstEmpty = jsvInitJsVars(1/*first*/, jsVarsSize);

0 commit comments

Comments
 (0)