We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f6ebcb2 commit 12b88efCopy full SHA for 12b88ef
include/rapidjson/uri.h
@@ -417,11 +417,8 @@ class GenericUri {
417
if (slashpos == 2 && path_[pathpos] == '.' && path_[pathpos + 1] == '.') {
418
// Backup a .. segment in the new path_
419
// We expect to find a previously added slash at the end or nothing
420
+ RAPIDJSON_ASSERT(newpos == 0 || path_[newpos - 1] == '/');
421
size_t lastslashpos = newpos;
- while (lastslashpos > 0) {
422
- if (path_[lastslashpos - 1] == '/') break;
423
- lastslashpos--;
424
- }
425
// Make sure we don't go beyond the start segment
426
if (lastslashpos > 1) {
427
// Find the next to last slash and back up to it
0 commit comments