From d084fc839ee8029ab15eb5b799c3fedb1a16ab7d Mon Sep 17 00:00:00 2001 From: 3lswear Date: Thu, 10 Feb 2022 22:34:23 +0300 Subject: [PATCH] fix: crash on assert in string --- src/Client/Request.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Client/Request.cpp b/src/Client/Request.cpp index 593749f..96ec965 100644 --- a/src/Client/Request.cpp +++ b/src/Client/Request.cpp @@ -166,6 +166,8 @@ int checkEnd(const std::string& str, const std::string& end) size_t i = str.size(); size_t j = end.size(); + if (i == 0) + return (1); while (j > 0) { i--;