Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Trim null characters from the end of ascii fields only when available.
Browse files Browse the repository at this point in the history
And take all characters into account.
  • Loading branch information
weberhofer committed Feb 3, 2017
1 parent d95ee76 commit 214d1a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PelIfd.php
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ public function newEntryFromData($tag, $format, $components, PelDataWindow $data
return $v;

case PelFormat::ASCII:
return new PelEntryAscii($tag, rtrim($data->getBytes(0, - 1), "\0"));
return new PelEntryAscii($tag, rtrim($data->getBytes(0), "\0"));

case PelFormat::SHORT:
$v = new PelEntryShort($tag);
Expand Down

0 comments on commit 214d1a4

Please sign in to comment.