diff options
author | Andrew Dolgov <[email protected]> | 2013-05-07 01:34:49 -0700 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-05-07 01:34:49 -0700 |
commit | a4fd183b5853867a9293dba438512d8400e6b65e (patch) | |
tree | 9776db47df16c7daa91f7a0e2c257031be75d33e /lib/phpqrcode/qrsplit.php | |
parent | 75933cf00d4331fd27821af03cadbb2e7c83da79 (diff) | |
parent | 6f7798b6434f5ef6073447998c436901b507e3df (diff) |
Merge pull request #180 from rlerdorf/master
Fix some bugs found by static analysis
Diffstat (limited to 'lib/phpqrcode/qrsplit.php')
-rw-r--r-- | lib/phpqrcode/qrsplit.php | 8 |
1 files changed, 4 insertions, 4 deletions
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 + } |