pengchanglu 3 lat temu
rodzic
commit
58e334eaed
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      application/common.php

+ 3 - 2
application/common.php

@@ -544,9 +544,10 @@ EOT;
             $strLen = strlen($str);
             $tmp = '';
             for ($i=0; $i<$strLen; $i++) {
-                if (isset($str[$i]) && isset($str[$i+1])) {
-                    $tmp .= $str[$i] ^ $str[++$i];
+                if (!isset($str[$i]) || !isset($str[$i+1])) {
+                    break;//错误编码
                 }
+                $tmp .= $str[$i] ^ $str[++$i];
             }
             return $tmp;
         }