Browse Source

fixed prepare not resetting instr ptr on reloads

master
Ludovic 'Archivist' Lagouardette 1 year ago
parent
commit
c2032c77c4
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      priv_include/UserScript/interpreter.h

+ 1
- 0
priv_include/UserScript/interpreter.h View File

@ -171,6 +171,7 @@ namespace scripting {
std::vector<script_error> errors;
auto lexed = ast::lex(code, errors);
auto parsed = ast::parse(lexed, errors);
instruction_ptr = 0;
if (errors.empty()) {
bytecode = generate(errors, parsed, repeating);
}

Loading…
Cancel
Save