From ff19d84c95dc0c0a8174f5a1941d87397f131000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Sun, 15 Mar 2020 12:35:33 -0500 Subject: Fix ugly errors --- lib/Punycode.jsm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/Punycode.jsm') diff --git a/lib/Punycode.jsm b/lib/Punycode.jsm index fb91610..cb3eca9 100644 --- a/lib/Punycode.jsm +++ b/lib/Punycode.jsm @@ -150,6 +150,7 @@ function decode(input) { for (let k=(basic > 0) ? basic + 1 : 0; k= len) { @@ -165,11 +166,11 @@ function decode(input) { i += digit * w; - let t = x <= bias ? + t = x <= bias ? tMin : - (t >= bias + tMax ? + (x >= bias + tMax ? tMax : - k - bias); + x - bias); if (digit < t) { break; -- cgit v1.2.3