Fix value comparison and sorting semantics
Build / AerScript (push) Successful in 31s

This commit is contained in:
2026-11-05 22:26:00 +01:00
parent 3c3c15281a
commit d98f6a8e91
10 changed files with 1956 additions and 681 deletions
+4 -3
View File
@@ -52,14 +52,15 @@ class Base32 {
$input = str_replace('=','', $input);
char[] $aInput = str_split($input);
string $binaryString = '';
string[] $sInput = str_split($input);
for($i = 0; $i < sizeof($aInput); $i = $i + 8) {
string $x = '';
if(!in_array($input[$i], Base32::$map))
if(!in_array($aInput[$i], Base32::$map))
return '';
for(int $j = 0; $j < 8; $j++) {
if($i + $j < strlen($input)) {
if(array_key_exists($input[$i + $j], Base32::$flippedMap)) {
$x += str_pad(base_convert(Base32::$flippedMap[$input[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);
if(array_key_exists($sInput[$i + $j], Base32::$flippedMap)) {
$x += str_pad(base_convert(Base32::$flippedMap[$sInput[$i + $j]], 10, 2), 5, '0', STR_PAD_LEFT);
}
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ class StringTokenizer {
}
public bool hasMoreTokens() {
return ($this->token != NULL);
return ($this->token != '');
}
public string nextToken() {