From 2fe8a69c4e17761e899386ce455bd232de934e4f Mon Sep 17 00:00:00 2001 From: slerena Date: Sun, 21 Feb 2010 18:37:55 +0000 Subject: [PATCH] 2010-02-20 Sancho Lerena * include/gettext.php: Applied patch to solve problem in 64bit systems. Thanks Junichi!. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2392 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 +++++ pandora_console/include/gettext.php | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 4a45f526f1..4e37493fde 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2010-02-20 Sancho Lerena + + * include/gettext.php: Applied patch to solve problem in 64bit + systems. Thanks Junichi!. + 2010-02-19 Sancho Lerena * functions_events.php: Fixed typo (switched meaning) in two labels. diff --git a/pandora_console/include/gettext.php b/pandora_console/include/gettext.php index c3c51cfa63..d74db83633 100644 --- a/pandora_console/include/gettext.php +++ b/pandora_console/include/gettext.php @@ -114,11 +114,14 @@ class gettext_reader { // $MAGIC2 = (int)0xde120495; //bug $MAGIC2 = (int) - 569244523; + // Applied patch for 64bit systems + // http://source.ibiblio.org/trac/lyceum/attachment/ticket/652/gettext-64bit-fix.diff + $this->STREAM = $Reader; $magic = $this->readint(); - if ($magic == $MAGIC1) { - $this->BYTEORDER = 0; - } elseif ($magic == $MAGIC2) { + if ($magic == ($MAGIC1 & 0xFFFFFFFF)) { + $this->BYTEORDER = 0; + } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) { $this->BYTEORDER = 1; } else { $this->error = 1; // not MO file