Skip to content
Browse files

Always parse 32bit integers

Signed-off-by: David Soria Parra <sn_@gmx.net>
  • Loading branch information...
1 parent 38d987d commit aee914e7b94ff5eb76a51738803e3c1187e244ad @dsp committed
Showing with 3 additions and 3 deletions.
  1. +3 −3 PHP.php
View
6 PHP.php
@@ -69,7 +69,7 @@ public function __construct($directory, $domain, $locale)
private function parseHeader($fp)
{
$data = fread($fp, 8);
- $header = unpack("imagic/irevision", $data);
+ $header = unpack("lmagic/lrevision", $data);
if ((int) self::MAGIC1 != $header['magic']
&& (int) self::MAGIC2 != $header['magic']) {
@@ -81,8 +81,8 @@ private function parseHeader($fp)
}
$data = fread($fp, 4 * 5);
- $offsets = unpack("inum_strings/iorig_offset/"
- . "itrans_offset/ihash_size/ihash_offset", $data);
+ $offsets = unpack("lnum_strings/lorig_offset/"
+ . "ltrans_offset/lhash_size/lhash_offset", $data);
return $offsets;
}

0 comments on commit aee914e

Please sign in to comment.
Something went wrong with that request. Please try again.