Skip to content

Commit 5343c83

Browse files
committed
Fix segfault (#278)
1 parent 5b75a77 commit 5343c83

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

playground/umka.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/umka_compiler.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,8 @@ void compilerInit(Compiler *comp, const char *fileName, const char *sourceString
157157
genInit (&comp->gen, &comp->debug, &comp->error);
158158
vmInit (&comp->vm, stackSize, fileSystemEnabled, &comp->error);
159159

160+
vmReset(&comp->vm, comp->gen.code, comp->gen.debugPerInstr);
161+
160162
char filePath[DEFAULT_STR_LEN + 1] = "";
161163
moduleAssertRegularizePath(&comp->modules, fileName, comp->modules.curFolder, filePath, DEFAULT_STR_LEN + 1);
162164

0 commit comments

Comments
 (0)