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