diff --git a/MultiLang/English.cpp b/MultiLang/English.cpp index 76efa302..bff71ecb 100644 --- a/MultiLang/English.cpp +++ b/MultiLang/English.cpp @@ -73,7 +73,7 @@ static constexpr MultiLang::string string_parameter_greater = "parameter must be static constexpr MultiLang::string userlib_not_found = "User lib not found: {0}"; static constexpr MultiLang::string userlib_function_not_found = "User lib function not found: {0}"; static constexpr MultiLang::wstring integer_divide_zero = L"Integer divide by zero."; -static constexpr MultiLang::wstring memory_access_violation = L"Memory Access Violation!\nThe program attempted to read or write to a protected memory address."; +static constexpr MultiLang::string memory_access_violation = "Memory Access Violation!\nThe program attempted to read or write to a protected memory address."; static constexpr MultiLang::wstring illegal_instruction = L"Illegal instruction.\nProcess tried to execute an invalid CPU instruction."; static constexpr MultiLang::wstring stack_overflow = L"Stack overflow.\nMake sure there is no recursion without a base case."; static constexpr MultiLang::wstring integer_overflow = L"Integer overflow!\nMake sure the integer doesnt exceed a value of 2147483647."; diff --git a/MultiLang/SimplifiedChinese.cpp b/MultiLang/SimplifiedChinese.cpp index 86a16719..7f49a023 100644 --- a/MultiLang/SimplifiedChinese.cpp +++ b/MultiLang/SimplifiedChinese.cpp @@ -76,7 +76,7 @@ static constexpr MultiLang::string userlib_not_found = "用户库未找到:{0}"; static constexpr MultiLang::string userlib_function_not_found = "用户库函数未找到:{0}"; static constexpr MultiLang::wstring integer_divide_zero = L"整数除零"; -static constexpr MultiLang::wstring memory_access_violation = L"内存访问冲突!\n程序试图读取或写入受保护的内存地址。"; +static constexpr MultiLang::string memory_access_violation = "内存访问冲突!\n程序试图读取或写入受保护的内存地址。"; static constexpr MultiLang::wstring illegal_instruction = L"非法指令。\n程序试图执行无效的CPU指令"; static constexpr MultiLang::wstring stack_overflow = L"堆栈溢出!\n请确保程序内没有递归现象"; static constexpr MultiLang::wstring integer_overflow = L"整数溢出!\n请确保整数的值不超过2147483647"; diff --git a/MultiLang/TraditionalChinese.cpp b/MultiLang/TraditionalChinese.cpp index 8fff9d2f..34077c66 100644 --- a/MultiLang/TraditionalChinese.cpp +++ b/MultiLang/TraditionalChinese.cpp @@ -73,7 +73,7 @@ static constexpr MultiLang::string userlib_not_found = "使用者庫未找到:{0}"; static constexpr MultiLang::string userlib_function_not_found = "使用者庫函式未找到:{0}"; static constexpr MultiLang::wstring integer_divide_zero = L"整數除零"; -static constexpr MultiLang::wstring memory_access_violation = L"記憶體訪問衝突!\n程式試圖讀取或寫入受保護的記憶體地址。"; +static constexpr MultiLang::string memory_access_violation = "記憶體訪問衝突!\n程式試圖讀取或寫入受保護的記憶體地址。"; static constexpr MultiLang::wstring illegal_instruction = L"非法指令。\n程式試圖執行無效的CPU指令"; static constexpr MultiLang::wstring stack_overflow = L"堆疊溢位!\n請確保程式內沒有遞迴現象"; static constexpr MultiLang::wstring integer_overflow = L"整數溢位!\n請確保整數的值不超過2147483647"; diff --git a/bbruntime/basic.cpp b/bbruntime/basic.cpp index b56f29f1..148af08c 100644 --- a/bbruntime/basic.cpp +++ b/bbruntime/basic.cpp @@ -530,10 +530,6 @@ void bbRuntimeStats() { gx_runtime->debugLog(std::format(MultiLang::stats_unreleased, unrelObjCnt).c_str()); } -void bbMav() { - bbruntime_panic(MultiLang::memory_access_violation); -} - bool basic_create() { next_handle = 0; handle_map.clear(); diff --git a/bbruntime_dll/bbruntime_dll.cpp b/bbruntime_dll/bbruntime_dll.cpp index f82cc822..568c6e4d 100644 --- a/bbruntime_dll/bbruntime_dll.cpp +++ b/bbruntime_dll/bbruntime_dll.cpp @@ -57,7 +57,7 @@ inline std::string replace_all(const std::string& string, const std::string& pat inline void throw_mav() { if (ErrorMessagePool::memoryAccessViolation == 0) { - bbruntime_panic(MultiLang::memory_access_violation); + RTEX(MultiLang::memory_access_violation); } else { std::string s = "";