From 6028967abeae88c2ea951aab125eb4318dca413d Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sat, 13 Apr 2024 22:59:14 +0800 Subject: [PATCH] Update error.cpp --- src/error.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error.cpp b/src/error.cpp index 3b7820c4..a1421d16 100644 --- a/src/error.cpp +++ b/src/error.cpp @@ -13,7 +13,7 @@ namespace pkpy{ index++; } 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; }else{ this->is_precompiled = false;