summaryrefslogtreecommitdiff
path: root/src/UriParse.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhsoting.net>2015-11-01 18:59:03 +0100
committerJörg Frings-Fürst <debian@jff-webhsoting.net>2015-11-01 18:59:03 +0100
commit4811bc2c6f88b9cb29d8c4470785f04d17ade607 (patch)
treebfd128a927f1877d6bc8661fb3aec8ac8b321b8f /src/UriParse.c
parent6edc89ead98d868702c798352bc384937827828b (diff)
parentbb0fbadacbd603b1e8d258f75ff5ca8ee481feb4 (diff)
Merge tag 'upstream/0.8.4'
Upstream version 0.8.4
Diffstat (limited to 'src/UriParse.c')
-rw-r--r--src/UriParse.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/UriParse.c b/src/UriParse.c
index 59a398b..e3cdc68 100644
--- a/src/UriParse.c
+++ b/src/UriParse.c
@@ -709,8 +709,20 @@ static const URI_CHAR * URI_FUNC(ParseIPv6address2)(URI_TYPE(ParserState) * stat
{
int setZipper = 0;
+ if (digitCount > 0) {
+ if (zipperEver) {
+ uriWriteQuadToDoubleByte(digitHistory, digitCount, quadsAfterZipper + 2 * quadsAfterZipperCount);
+ quadsAfterZipperCount++;
+ } else {
+ uriWriteQuadToDoubleByte(digitHistory, digitCount, state->uri->hostData.ip6->data + 2 * quadsDone);
+ }
+ quadsDone++;
+ digitCount = 0;
+ }
+ letterAmong = 0;
+
/* Too many quads? */
- if (quadsDone > 8 - zipperEver) {
+ if (quadsDone >= 8 - zipperEver) {
URI_FUNC(StopSyntax)(state, first);
return NULL;
}
@@ -743,17 +755,6 @@ static const URI_CHAR * URI_FUNC(ParseIPv6address2)(URI_TYPE(ParserState) * stat
return NULL; /* ":::+ "*/
}
}
- if (digitCount > 0) {
- if (zipperEver) {
- uriWriteQuadToDoubleByte(digitHistory, digitCount, quadsAfterZipper + 2 * quadsAfterZipperCount);
- quadsAfterZipperCount++;
- } else {
- uriWriteQuadToDoubleByte(digitHistory, digitCount, state->uri->hostData.ip6->data + 2 * quadsDone);
- }
- quadsDone++;
- digitCount = 0;
- }
- letterAmong = 0;
if (setZipper) {
zipperEver = 1;