Skip to content

Commit

Permalink
Some cosmetic changes in CFBinaryPropertyList::packItWithSize()
Browse files Browse the repository at this point in the history
  • Loading branch information
robbertkl committed Oct 16, 2013
1 parent b5e1489 commit b4ec649
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions classes/CFPropertyList/CFBinaryPropertyList.php
Expand Up @@ -584,13 +584,12 @@ public static function bytesInt($int) {
/**
* „pack” a value (i.e. write the binary representation as big endian to a string) with the specified size
* @param integer $nbytes The number of bytes to pack
* @param integer $int the integer value to pack
* @param integer $int The integer value to pack
* @return string The packed value as string
*/
public static function packItWithSize($nbytes,$int) {
$formats = Array("C", "n", "N", "N");
$format = $formats[$nbytes-1];
$ret = '';

if($nbytes == 3) return substr(pack($format, $int), -3);
return pack($format, $int);
Expand Down

0 comments on commit b4ec649

Please sign in to comment.