mirror of
https://github.com/ascii-boxes/boxes.git
synced 2025-06-02 16:16:49 +02:00
Fix failing test 150_tag_config_invalid_tags on big-endian systems
used (ucs4_t)ascii; in the to ensure compatibility with both little and big-endian systems. Fixes:https://github.com/ascii-boxes/boxes/issues/130
This commit is contained in:
parent
bae35281d0
commit
ba901ba5e7
@ -154,8 +154,7 @@ ucs4_t to_utf32(char ascii)
|
|||||||
{
|
{
|
||||||
ucs4_t c = char_nul;
|
ucs4_t c = char_nul;
|
||||||
if (ascii >= 0x20 && ascii < 0x7f) {
|
if (ascii >= 0x20 && ascii < 0x7f) {
|
||||||
char *bytes = (char *) (&c);
|
c = (ucs4_t)ascii; // Store the ASCII value directly in c
|
||||||
bytes[0] = ascii;
|
|
||||||
}
|
}
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user