From fc25dd69e1d8af92d6d99b8c4c689ab83bd61365 Mon Sep 17 00:00:00 2001 From: ValKmjolnir Date: Sat, 16 Apr 2022 19:45:55 +0800 Subject: [PATCH] fix bug in codegen: foreach/forindex(id;vec/hash) may cause segmentation fault because of incorrect generated operand --- main.cpp | 5 +-- nasal.h | 2 ++ nasal_codegen.h | 84 ++++++++++++++++++++++++++++++++++++++++++------- nasal_lexer.h | 9 +++++- nasal_vm.h | 2 ++ 5 files changed, 88 insertions(+), 14 deletions(-) diff --git a/main.cpp b/main.cpp index 8b4aa43..1b68716 100644 --- a/main.cpp +++ b/main.cpp @@ -14,7 +14,7 @@ void help() { std::cout #ifdef _WIN32 - <<"use command \'chcp 65001\' if want to use unicode.\n" + <<"use command if want to use unicode.\n" #endif <<"nasal