From d52c86bcac320c8f0f00bc60c9cecfd26347e6ad Mon Sep 17 00:00:00 2001 From: kelson42 Date: Mon, 13 Sep 2010 19:59:51 +0000 Subject: [PATCH] * Fix an URL parsing issue impacting title containing a '/' (ID: 3065286) --- src/common/kiwix/reader.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/kiwix/reader.cpp b/src/common/kiwix/reader.cpp index 55c2670d..90af5fca 100644 --- a/src/common/kiwix/reader.cpp +++ b/src/common/kiwix/reader.cpp @@ -108,12 +108,12 @@ namespace kiwix { unsigned int offset = 0; /* Ignore the '/' */ - while((offset < urlLength) && (url[offset] == '/')) offset++; + while ((offset < urlLength) && (url[offset] == '/')) offset++; /* Get namespace */ char ns[1024]; unsigned int nsOffset = 0; - while((offset < urlLength) && (url[offset] != '/')) { + while ((offset < urlLength) && (url[offset] != '/')) { ns[nsOffset] = url[offset]; offset++; nsOffset++; @@ -121,12 +121,12 @@ namespace kiwix { ns[nsOffset] = 0; /* Ignore the '/' */ - while((offset < urlLength) && (url[offset] == '/')) offset++; + while ((offset < urlLength) && (url[offset] == '/')) offset++; /* Get content title */ char title[1024]; unsigned int titleOffset = 0; - while((offset < urlLength) && (url[offset] != '/')) { + while (offset < urlLength) { title[titleOffset] = url[offset]; offset++; titleOffset++;