From 51afe3dacd6e6b03f0cd66f95959405e75e4a25a Mon Sep 17 00:00:00 2001 From: ValKmjolnir Date: Mon, 14 Feb 2022 17:40:19 +0800 Subject: [PATCH] fixed bug when -O0 the program crashes with code 01. add `nasal_err():error(0){}` in `nasal_err.h:47` as the constructor. --- nasal_err.h | 1 + 1 file changed, 1 insertion(+) diff --git a/nasal_err.h b/nasal_err.h index d935e6e..ffe0ec1 100644 --- a/nasal_err.h +++ b/nasal_err.h @@ -45,6 +45,7 @@ class nasal_err:public file_line private: uint32_t error; public: + nasal_err():error(0){} void err(const char* stage,const std::string& info) { ++error;