This commit is contained in:
blueloveTH 2023-07-15 16:14:42 +08:00
parent 35a694ac29
commit 0c2d042020

View File

@ -103,15 +103,7 @@ int main(int argc, char** argv){
std::filesystem::current_path(filepath.parent_path());
bool ok = pkpy_exec_2(vm, src.c_str(), filepath.filename().string().c_str(), 0, NULL);
if(!ok){
char* err;
if(pkpy_clear_error(vm, &err)){
std::cerr << err << std::endl;
pkpy_free(err);
}else{
std::cerr << "Unknown error" << std::endl;
}
}
if(!ok) pkpy_clear_error(vm, NULL);
pkpy_delete_vm(vm);
return ok ? 0 : 1;
}