Skip to content

Commit

Permalink
Fix failing test 150_tag_config_invalid_tags on big-endian systems
Browse files Browse the repository at this point in the history
used (ucs4_t)ascii; in the to ensure compatibility with both
little and big-endian systems.

Fixes:#130
  • Loading branch information
Gayathri-Berli authored and tsjensen committed Jan 22, 2025
1 parent bae3528 commit ba901ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ ucs4_t to_utf32(char ascii)
{
ucs4_t c = char_nul;
if (ascii >= 0x20 && ascii < 0x7f) {
char *bytes = (char *) (&c);
bytes[0] = ascii;
c = (ucs4_t)ascii; // Store the ASCII value directly in c
}
return c;
}
Expand Down

0 comments on commit ba901ba

Please sign in to comment.