Skip to content

Commit 1871d95

Browse files
committed
FIX: only using paren char escaping for chars in range 0x7F - 0x9F
related to: Oldes/Rebol-issues#2574
1 parent 3a72825 commit 1871d95

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/core/s-mold.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,7 @@ STOID Sniff_String(REBSER *ser, REBCNT idx, REB_STRF *sf)
315315
default:
316316
if (c == 0x1e) sf->chr1e += 4; // special case of ^(1e)
317317
else if (IS_CHR_ESC(c)) sf->escape++;
318-
else if (c >= 0x1000) sf->paren += 6; // ^(1234)
319-
else if (c >= 0x100) sf->paren += 5; // ^(123)
320-
else if (c >= 0x7f) sf->paren += 4; // ^(12)
318+
else if (c >= 0x7f && c < 0xA0) sf->paren += 4; // ^(12)
321319
}
322320
}
323321
if (sf->brace_in != sf->brace_out) sf->malign++;

src/tests/units/mold-test.r3

+1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ Rebol [
204204
]
205205
]
206206
try [delete %tmp2574]
207+
--assert {"�"} = mold to string! #{F09F989C}
207208

208209

209210
===end-group===

0 commit comments

Comments
 (0)