Reference passing fix from jsteidl. fixes #1676

git-svn-id: http://svn.automattic.com/wordpress/trunk@2882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2005-09-15 23:42:29 +00:00
parent ef29f0ba5f
commit 69fad9bf3b
1 changed files with 5 additions and 2 deletions

View File

@ -61,12 +61,15 @@ class gettext_reader {
* @return Integer from the Stream
*/
function readint() {
$stream = $this->STREAM->read(4);
if ($this->BYTEORDER == 0) {
// low endian
return array_shift(unpack('V', $this->STREAM->read(4)));
$unpacked = unpack('V',$stream);
return array_shift($unpacked);
} else {
// big endian
return array_shift(unpack('N', $this->STREAM->read(4)));
$unpacked = unpack('N',$stream);
return array_shift($unpacked);
}
}