aboutsummaryrefslogtreecommitdiff
path: root/src/Uri.cpp
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2020-10-09 13:34:32 -0700
committerRichard Walters <rwalters@digitalstirling.com>2020-10-09 13:34:32 -0700
commit5d744a843c0fb8af675240a20f13cd48100d32f9 (patch)
tree2b8ade01bf9bbe565ee98470c3ceab1d42c6c7b6 /src/Uri.cpp
parentd303237c82a0d81785b8218a4d6a3f18f86f5d11 (diff)
Remove unnecessary check in IPv6 parsing
It's not possible to have encountered a double-colon when in the COLON_BUT_NO_GROUPS_YET state.
Diffstat (limited to 'src/Uri.cpp')
-rw-r--r--src/Uri.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Uri.cpp b/src/Uri.cpp
index 41ea1a4..ff161f3 100644
--- a/src/Uri.cpp
+++ b/src/Uri.cpp
@@ -270,12 +270,8 @@ namespace {
case ValidationState::COLON_BUT_NO_GROUPS_YET: {
if (c == ':') {
- if (doubleColonEncountered) {
- return false;
- } else {
- doubleColonEncountered = true;
- state = ValidationState::AFTER_DOUBLE_COLON;
- }
+ doubleColonEncountered = true;
+ state = ValidationState::AFTER_DOUBLE_COLON;
} else {
return false;
}