gettext byteorder fix for 64 bit archs. fixes #3780
git-svn-id: https://develop.svn.wordpress.org/trunk@4917 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3bfb19f002
commit
5fbcbf7f70
@ -108,10 +108,12 @@ class gettext_reader {
|
||||
$MAGIC1 = (int) - 1794895138;
|
||||
// $MAGIC2 = (int)0xde120495; //bug
|
||||
$MAGIC2 = (int) - 569244523;
|
||||
// 64-bit fix
|
||||
$MAGIC3 = (int) 2500072158;
|
||||
|
||||
$this->STREAM = $Reader;
|
||||
$magic = $this->readint();
|
||||
if ($magic == ($MAGIC1 & 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms
|
||||
if ($magic == ($MAGIC1 & 0xFFFFFFFF) || $magic == ($MAGIC3 & 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms
|
||||
$this->BYTEORDER = 0;
|
||||
} elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) {
|
||||
$this->BYTEORDER = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user