diff options
author | Jesús <heckyel@hyperbola.info> | 2020-03-15 12:35:33 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-03-15 12:35:33 -0500 |
commit | ff19d84c95dc0c0a8174f5a1941d87397f131000 (patch) | |
tree | 7150447c9ae26519484b866df00e0e8b46be2301 | |
parent | 89d08ef3bdaa3814c73e6ee0076027438557673a (diff) | |
download | ematrix-ff19d84c95dc0c0a8174f5a1941d87397f131000.tar.lz ematrix-ff19d84c95dc0c0a8174f5a1941d87397f131000.tar.xz ematrix-ff19d84c95dc0c0a8174f5a1941d87397f131000.zip |
Fix ugly errors
-rw-r--r-- | lib/CookieCache.jsm | 2 | ||||
-rw-r--r-- | lib/Punycode.jsm | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/CookieCache.jsm b/lib/CookieCache.jsm index 57d3c64..301b870 100644 --- a/lib/CookieCache.jsm +++ b/lib/CookieCache.jsm @@ -150,7 +150,7 @@ var CookieCache = { }, remove: function (cookie) { let value = dict.get(cookie); - if (cookie === undefined) { + if (value === undefined) { return false; } 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;) { let old = i; + let t = 0 for (let w=1, x=base; ; x+=base) { if (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; |