Skip to content

read_byte should wrap an unsigned char #7

@dvanhorn

Description

@dvanhorn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions