optimize code & chdir will not trigger crash if failed to call

This commit is contained in:
ValKmjolnir
2022-07-30 19:17:33 +08:00
parent 52fcc9118c
commit 7ad1d69c64
6 changed files with 29 additions and 52 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ struct nas_upval
std::vector<nas_ref> elems;
nas_upval(){onstk=true;stk=nullptr;size=0;}
nas_ref& operator[](const int i){return onstk?stk[i]:elems[i];}
nas_ref& operator[](usize n){return onstk?stk[n]:elems[n];}
void clear(){onstk=true;elems.clear();size=0;}
};