diff --git a/src/str.cpp b/src/str.cpp index 7050f79b..5d55bbba 100644 --- a/src/str.cpp +++ b/src/str.cpp @@ -310,6 +310,9 @@ bool str::startswith(const char *s_, const char *p_) noexcept { + if((s_ == nullptr) || (p_ == nullptr)) + return false; + while(*p_) { if(*p_ != *s_)