Skip to content

Commit ad994b4

Browse files
committed
Fix substr length
1 parent 15d8bf3 commit ad994b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/Packet.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ public function setPacketId($value)
812812
substr($value, 0, 2) == '&o' || substr($value, 0, 2) == '&O'))
813813
{
814814
// Octal (&o123, &O123)
815-
$v = octdec(substr($value, 1));
815+
$v = octdec(substr($value, 2));
816816
}
817817
else if (is_numeric($value) && strpos($value, '.') === false)
818818
{

0 commit comments

Comments
 (0)