Skip to content

Commit

Permalink
Great optimization for SetErrorMsg
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiYueCommentary committed Aug 10, 2024
1 parent 2b1648e commit d05ddb8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bbruntime/bbruntime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void bbInitErrorMsgs(int number, bool hasMacro) {

void bbSetErrorMsg(int pos, BBStr* str) {
if(ErrorMessagePool::memoryAccessViolation != 0 && pos < ErrorMessagePool::size) {
ErrorMessagePool::memoryAccessViolation[pos] = UTF8::convertToAnsi(str->c_str());
ErrorMessagePool::memoryAccessViolation[pos] = str->c_str();
}
delete str;
}
Expand Down
2 changes: 1 addition & 1 deletion bbruntime_dll/bbruntime_dll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ inline void throw_mav() {
s = replace_all(s, "_AvailPhys_", to_string(gx_runtime->getAvailPhys()));
s = replace_all(s, "_AvailVirtual_", to_string(gx_runtime->getAvailVirtual()));
}
RTEX(s.c_str());
RTEX(UTF8::convertToAnsi(s).c_str());
}
}

Expand Down

0 comments on commit d05ddb8

Please # to comment.