Skip to content

Commit

Permalink
Fix bug where string len can go over wanted len
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbennett committed Jul 28, 2016
1 parent ddcf028 commit 17c34f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public static function stripUpTo($buffer, $chr, $len = 0) {
} else if ($i === false && $len > 0) {
return self::stripToSnippet($buffer, $len);
} else {
return substr($buffer, 0, $i);
return self::stripToSnippet(substr($buffer, 0, $i), $len);
}
}

Expand Down

0 comments on commit 17c34f1

Please sign in to comment.