fix a bug

This commit is contained in:
blueloveTH 2022-11-11 19:04:26 +08:00
parent 054a2a6873
commit c75cf86270
2 changed files with 3 additions and 4 deletions

View File

@ -20,13 +20,12 @@ struct Timer{
};
VM* newVM(){
// disable buff of std::cout and std::cerr
std::cout.setf(std::ios::unitbuf);
std::cerr.setf(std::ios::unitbuf);
VM* vm = createVM([](const char* str) {
std::cout << str;
std::cout.flush();
}, [](const char* str) {
std::cerr << str;
std::cerr.flush();
});
return vm;
}

View File

@ -668,7 +668,7 @@ private:
std::stack<_Str> _cleanErrorAndGetSnapshots(){
std::stack<_Str> snapshots;
while (!callstack.empty()){
if(snapshots.size() < 10){
if(snapshots.size() < 8){
snapshots.push(callstack.top()->errorSnapshot());
}
callstack.pop();