Skip to content

Conversation

@8ctopus
Copy link
Contributor

@8ctopus 8ctopus commented Nov 27, 2025

@8ctopus 8ctopus mentioned this pull request Nov 27, 2025
@bsweeney bsweeney added this to the 1.0.2 milestone Nov 27, 2025
@bsweeney bsweeney closed this in #153 Jan 1, 2026
@bsweeney bsweeney reopened this Jan 2, 2026
$uint8 = $this->read(1);

if ($uint8 === '') {
$uint8 = '0';
Copy link
Member

@bsweeney bsweeney Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you default to the string '0' if there's no data. ord('0') returns a value of 48. The equivalent behavior for an empty string would be to just return 0, no need to call the ord function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants