summaryrefslogtreecommitdiff
path: root/sys/src/libhtml/utils.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-12-31 21:09:46 +0100
committercinap_lenrek <cinap_lenrek@gmx.de>2012-12-31 21:09:46 +0100
commit6cadd03bbeace1c256ba875c2e6a877f924877cd (patch)
tree8079ea6f6ccdb1c2cbb2b7813f618837617cb33e /sys/src/libhtml/utils.c
parent6d99096136278f06f6333f927da34105a8dfe0bf (diff)
fix utf and rune handling in preparation for 32bit runes
Diffstat (limited to 'sys/src/libhtml/utils.c')
-rw-r--r--sys/src/libhtml/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/libhtml/utils.c b/sys/src/libhtml/utils.c
index 5998913ac..7b272d904 100644
--- a/sys/src/libhtml/utils.c
+++ b/sys/src/libhtml/utils.c
@@ -535,7 +535,7 @@ toStr(uchar* buf, int n, int chset)
// Convert buf[0:n], Unicode characters,
// into an emalloc'd null-terminated string in character set chset.
-// Use 0x80 for unconvertable characters.
+// Use Runeerror for unconvertable characters.
uchar*
fromStr(Rune* buf, int n, int chset)
{
@@ -554,7 +554,7 @@ fromStr(Rune* buf, int n, int chset)
for(i = 0; i < n; i++) {
ch = buf[i];
if(ch > lim)
- ch = 0x80;
+ ch = Runeerror;
ans[i] = ch;
}
ans[n] = 0;