prepend 0 if crc is <= 16

This commit is contained in:
zefie
2022-11-29 16:51:12 -05:00
parent 83e2d779f2
commit b7b17b7a33
2 changed files with 7 additions and 2 deletions

View File

@@ -532,7 +532,10 @@ function getSSIDCRC(ssid) {
if(isNaN(crc)) crc = 0;
}
return crc.toString(16);
var out = crc.toString(16);
if (out.length == 1) return "0" + out;
else return out;
}
function generateSSID() {

View File

@@ -57,7 +57,9 @@ class WTVShared {
if (isNaN(crc)) crc = 0;
}
return crc.toString(16);
var out = crc.toString(16);
if (out.length == 1) return "0" + out;
else return out;
}
atob(a) {