1
0
mirror of https://github.com/danog/PHPStruct.git synced 2024-11-26 11:44:39 +01:00

Fixed some more typos

This commit is contained in:
danogentili 2016-07-23 00:15:51 +02:00
parent 6f9e493cc0
commit cc041556d6
2 changed files with 3 additions and 2 deletions

View File

@ -5,7 +5,8 @@ require 'lib/danog/PHP/Struct.php';
//var_dump(["nv", 61, 61, false, 333, 444, 232423, 234342, 243342423424, 234234234234, 234234234234, 234234234234, 34434, 344434, 2.2343, 3.03424, "dd"]);
var_dump(\danog\PHP\Struct::unpack('2cxbxBx?xhxHxixIxlxLxqxQxnxNxfxdx2sx5pP',
\danog\PHP\Struct::pack('2cxbxBx?xhxHxixIxlxLxqxQxnxNxfxdx2sx5pP',
'n', 'v', 100, 100, false, 333, 444, 232423, 234342, 234234234234, 234234234234, 234234234234, 234234234234, 34434, 344434, 2.2343,
'n', 'v', 100, 100, false, 333, 444, 232423, 234342, 234234234234, 234234234234, 888888888888,
888888888888, 34434, 344434, 2.2343,
3.03424, 'df', 'asdfghjkl', 1283912
)

View File

@ -341,7 +341,7 @@ class Struct
break;
case 'q':
case 'Q':
$result[$arraycount] = $this->IS64BIT ? implode('', unpack($command['phpformat'].$command['count'], $dataarray[$command['datakey']])) : $this->manual_q_unpack($command['count'], $dataarray[$command['datakey']]);
$result[$arraycount] = $this->IS64BIT ? implode('', unpack($command['phpformat'].$command['count'], $dataarray[$command['datakey']])) : $this->manual_q_unpack($dataarray[$command['datakey']]);
break;
default:
$result[$arraycount] = implode('', unpack($command['phpformat'].$command['count'], $dataarray[$command['datakey']])); // Unpack current char