mirror of
https://github.com/danog/PHPStruct.git
synced 2024-11-30 04:19:08 +01:00
Update
This commit is contained in:
parent
c45742bcbc
commit
da3d4f5a11
1317
composer.lock
generated
1317
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -188,7 +188,7 @@ class Struct
|
||||
}
|
||||
break;
|
||||
case 'bool':
|
||||
//if(!is_bool($data[$command["datakey"]])) throw new StructException("Required argument is not a bool."); // Ignore boolean type
|
||||
$data[$command['datakey']] = (bool) $data[$command['datakey']];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -201,9 +201,6 @@ class Struct
|
||||
$tempstring = pack('a'.($command['count'] - 1), $data[$command['datakey']]);
|
||||
$curresult = pack('v', ($command['count'] - 1 > 255) ? 255 : $command['count'] - 1)[0].$tempstring;
|
||||
break;
|
||||
case '?':
|
||||
$curresult = pack($command['phpformat'], (bool) $data[$command['datakey']]);
|
||||
break;
|
||||
default:
|
||||
$curresult = pack($command['phpformat'].$command['count'], $data[$command['datakey']]); // Pack current char
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user