1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 14:31:13 +01:00

Hotfix: waveform deserialization

This commit is contained in:
Alexander Pankratov 2023-07-10 01:50:47 +02:00
parent dec5bff3c9
commit 7e69782e74

View File

@ -871,6 +871,12 @@ final class TL implements TLInterface
public static function extractWaveform(string $x): array
{
$values = \array_values(\unpack('C*', $x));
$valuesLength = count($values);
if ($valuesLength < 63) {
$addCount = 63 - $valuesLength;
array_push($values, ...\array_fill(0, $addCount, 0));
}
$result = \array_fill(0, 100, 0);
$bitPos = 0;
foreach ($result as &$value) {