Update error.cpp

This commit is contained in:
blueloveTH 2024-04-13 22:59:14 +08:00
parent 0d41d40456
commit 6028967abe

View File

@ -13,7 +13,7 @@ namespace pkpy{
index++; index++;
} }
this->source = ss.str(); this->source = ss.str();
if(this->source.sv().substr(5) == "pkpy:"){ if(this->source.size > 5 && this->source.sv().substr(0, 5) == "pkpy:"){
this->is_precompiled = true; this->is_precompiled = true;
}else{ }else{
this->is_precompiled = false; this->is_precompiled = false;