Skip to content

Commit

Permalink
Merge pull request #5 from sc0Vu/master
Browse files Browse the repository at this point in the history
Fix bug throw exception when value is integer.
  • Loading branch information
sc0Vu committed Feb 25, 2018
2 parents b4d644e + cf83c26 commit 2f2678c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RLP.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function encode($inputs)
$length = $input->length();

if ($length === 1 && $input[0] < 128) {
return $input[0];
return [$input[0]];
} else {
return $output->concat($this->encodeLength($length, 128), $input);
}
Expand Down

0 comments on commit 2f2678c

Please sign in to comment.