bug fixed in nasal_vec::print and nasal_hash::print

if vec's or hash's size is 0, a bug will occur because ++depth. now the ++depth has been put behind the size()
This commit is contained in:
ValKmjolnir
2022-01-29 19:51:43 +08:00
parent 0a407437a4
commit 4def93b4ad
5 changed files with 173 additions and 41 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ public:
std::ifstream fin(f,std::ios::binary);
if(fin.fail())
{
std::cout<<"[src] cannot open file <"<<f<<">\n";
std::cerr<<"[src] cannot open file <"<<f<<">\n";
std::exit(1);
}
std::string line;