From 5fbcbf7f7054c0eaf6af9aea074f529f3cff4c01 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 23 Feb 2007 00:31:09 +0000 Subject: [PATCH] gettext byteorder fix for 64 bit archs. fixes #3780 git-svn-id: https://develop.svn.wordpress.org/trunk@4917 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/gettext.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-includes/gettext.php b/wp-includes/gettext.php index a35b0b9a99..dd79dcd50f 100644 --- a/wp-includes/gettext.php +++ b/wp-includes/gettext.php @@ -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;