Skip to content

Commit

Permalink
Update CAR.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Dec 15, 2024
1 parent 0741744 commit d250700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Support/CAR.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public static function decodeRoots(StreamInterface|string $data): array

$roots = collect($roots)->map(function ($root) {
$cid = $root->getValue()->getValue();
$cid = Str::ltrim($cid, "\00"); // remove first 0x00
$cid = Str::ltrim($cid, "\x00"); // remove first 0x00

return Multibase::encode(Multibase::BASE32, $cid);
});
Expand Down

0 comments on commit d250700

Please sign in to comment.