diff --git a/pe_lib/utils.h b/pe_lib/utils.h index dc52fc4..17303fe 100644 --- a/pe_lib/utils.h +++ b/pe_lib/utils.h @@ -27,7 +27,7 @@ class pe_utils template static void strip_nullbytes(std::basic_string& str) { - while(!*(str.end() - 1) && !str.empty()) + while(!str.empty() && !*(str.end() - 1)) str.erase(str.length() - 1); }