Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read_byte should wrap an unsigned char #144

Open
dvanhorn opened this issue Jun 29, 2023 · 0 comments
Open

read_byte should wrap an unsigned char #144

dvanhorn opened this issue Jun 29, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@dvanhorn
Copy link
Member

Currently read_byte returns val_wrap_int(c) where c is the char that was read, but this will encode the byte as a signed integer, whereas a byte should be in (0,256]. The fix is to add a new function to the run-time:

val_t val_wrap_byte(unsigned char b)

and have read_byte return val_wrap_byte(c). The definition is the same as val_wrap_int.

dvanhorn added a commit that referenced this issue Jul 1, 2023
dvanhorn added a commit that referenced this issue Jul 2, 2023
@dvanhorn dvanhorn added the bug Something isn't working label Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant