From 12b88efa6f35ae820bab05a60b7ca5d73113e41c Mon Sep 17 00:00:00 2001 From: Steve Hanson Date: Wed, 9 Jun 2021 18:11:04 +0100 Subject: [PATCH] fix coverage again --- include/rapidjson/uri.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/rapidjson/uri.h b/include/rapidjson/uri.h index 97c84f1..6b80147 100644 --- a/include/rapidjson/uri.h +++ b/include/rapidjson/uri.h @@ -417,11 +417,8 @@ private: if (slashpos == 2 && path_[pathpos] == '.' && path_[pathpos + 1] == '.') { // Backup a .. segment in the new path_ // We expect to find a previously added slash at the end or nothing + RAPIDJSON_ASSERT(newpos == 0 || path_[newpos - 1] == '/'); size_t lastslashpos = newpos; - while (lastslashpos > 0) { - if (path_[lastslashpos - 1] == '/') break; - lastslashpos--; - } // Make sure we don't go beyond the start segment if (lastslashpos > 1) { // Find the next to last slash and back up to it