This commit is contained in:
DariusIII
2025-04-15 16:37:00 +02:00
parent 05e74d7b06
commit fe40f8b4ab
+6 -6
View File
@@ -58,9 +58,9 @@ class PhpYenc
$encodedLength = \strlen($encoded);
for ($chr = 0; $chr < $encodedLength; $chr++) {
$decoded .= (
$encoded[$chr] === '=' ?
\chr((\ord($encoded[$chr]) - 42) % 256) :
\chr((((\ord($encoded[++$chr]) - 64) % 256) - 42) % 256)
$encoded[$chr] === '=' ?
\chr((\ord($encoded[$chr]) - 42) % 256) :
\chr((((\ord($encoded[++$chr]) - 64) % 256) - 42) % 256)
);
}
@@ -113,9 +113,9 @@ class PhpYenc
$length = \strlen($input);
for ($chr = 0; $chr < $length; $chr++) {
$text .= (
$input[$chr] === '=' ?
\chr((((\ord($input[++$chr]) - 64) % 256) - 42) % 256) :
\chr((\ord($input[$chr]) - 42) % 256)
$input[$chr] === '=' ?
\chr((((\ord($input[++$chr]) - 64) % 256) - 42) % 256) :
\chr((\ord($input[$chr]) - 42) % 256)
);
}
}