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:
parent
dec5bff3c9
commit
7e69782e74
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user