Skip to content

Commit

Permalink
FIX: only using paren char escaping for chars in range 0x7F - 0x9F
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Oct 26, 2023
1 parent 3a72825 commit 1871d95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/s-mold.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,7 @@ STOID Sniff_String(REBSER *ser, REBCNT idx, REB_STRF *sf)
default:
if (c == 0x1e) sf->chr1e += 4; // special case of ^(1e)
else if (IS_CHR_ESC(c)) sf->escape++;
else if (c >= 0x1000) sf->paren += 6; // ^(1234)
else if (c >= 0x100) sf->paren += 5; // ^(123)
else if (c >= 0x7f) sf->paren += 4; // ^(12)
else if (c >= 0x7f && c < 0xA0) sf->paren += 4; // ^(12)
}
}
if (sf->brace_in != sf->brace_out) sf->malign++;
Expand Down
1 change: 1 addition & 0 deletions src/tests/units/mold-test.r3
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ Rebol [
]
]
try [delete %tmp2574]
--assert {"�"} = mold to string! #{F09F989C}


===end-group===
Expand Down

0 comments on commit 1871d95

Please sign in to comment.