From c2032c77c44b96b8ffcbb1c97190c65a87f1a138 Mon Sep 17 00:00:00 2001 From: Ludovic 'Archivist' Lagouardette Date: Fri, 4 Aug 2023 10:49:45 +0200 Subject: [PATCH] fixed prepare not resetting instr ptr on reloads --- priv_include/UserScript/interpreter.h | 1 + 1 file changed, 1 insertion(+) diff --git a/priv_include/UserScript/interpreter.h b/priv_include/UserScript/interpreter.h index 198cc76..59cd983 100644 --- a/priv_include/UserScript/interpreter.h +++ b/priv_include/UserScript/interpreter.h @@ -171,6 +171,7 @@ namespace scripting { std::vector errors; auto lexed = ast::lex(code, errors); auto parsed = ast::parse(lexed, errors); + instruction_ptr = 0; if (errors.empty()) { bytecode = generate(errors, parsed, repeating); }