about summary refs log tree commit diff stats
path: root/src/utils/twtstr.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-01-05 18:19:17 +0100
committerbptato <nincsnevem662@gmail.com>2023-01-05 18:19:17 +0100
commitf0060222b826799dfabc19cc8163eea9037cc7cb (patch)
tree28f4188cba867f19cda36ea951e465478bb6bebe /src/utils/twtstr.nim
parentd3e50ed1e95e2b114a9a4e2fa2e1f1d7b988cfe9 (diff)
downloadchawan-f0060222b826799dfabc19cc8163eea9037cc7cb.tar.gz
twtstr: fix oversight
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r--src/utils/twtstr.nim7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index 82ce2e57..5a5d5819 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -669,13 +669,8 @@ func unicodeToAscii*(s: string, checkhyphens, checkbidi, checkjoiners, transitio
       let rl = labels[^1].runeLen()
       if rl notin 1..63:
         return none(string)
-  if verifydnslength:
-    var all = 0
-    for label in labels:
-      let rl = label.runeLen()
-      if rl notin 0..63:
-        return none(string) #error
       all += rl
+  if verifydnslength:
     if all notin 1..253:
       return none(string) #error
   return some(labels.join('.'))