From 6f7798b6434f5ef6073447998c436901b507e3df Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Tue, 7 May 2013 00:35:10 -0700 Subject: Fixing bugs found by static analysis --- lib/phpqrcode/qrsplit.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/phpqrcode/qrsplit.php') diff --git a/lib/phpqrcode/qrsplit.php b/lib/phpqrcode/qrsplit.php index d75b82737..1f9f65c3b 100644 --- a/lib/phpqrcode/qrsplit.php +++ b/lib/phpqrcode/qrsplit.php @@ -186,7 +186,7 @@ if($ret < 0) return -1; - return $run; + return $ret; } //---------------------------------------------------------------------- @@ -258,7 +258,7 @@ case QR_MODE_NUM: $length = $this->eatNum(); break; case QR_MODE_AN: $length = $this->eatAn(); break; case QR_MODE_KANJI: - if ($hint == QR_MODE_KANJI) + if ($this->modeHint == QR_MODE_KANJI) $length = $this->eatKanji(); else $length = $this->eat8(); break; @@ -280,7 +280,7 @@ $p = 0; while ($p<$stringLen) { - $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint); + $mode = self::identifyMode(substr($this->dataStr, $p)); if($mode == QR_MODE_KANJI) { $p += 2; } else { @@ -308,4 +308,4 @@ return $split->splitString(); } - } \ No newline at end of file + } -- cgit v1.2.3