From a2f1df024bc43e9c7a448c91c08304faa963c1f3 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 8 May 2002 23:32:27 +0000 Subject: [PATCH] (END): Initialize lastgb and gbtable[lastgb] correctly. --- etc/charsets/gb18030.awk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etc/charsets/gb18030.awk b/etc/charsets/gb18030.awk index df56a8b2ca1..b09571fca62 100644 --- a/etc/charsets/gb18030.awk +++ b/etc/charsets/gb18030.awk @@ -69,8 +69,10 @@ function printline(from, to) { END { lastgb = 0; - surrogate_min = decode_hex("D800") - surrogate_max = decode_hex("DFFF") + surrogate_min = decode_hex("D800"); + surrogate_max = decode_hex("DFFF"); + lastgb = unitable[128]; + gbtable[lastgb] = 128; for (i = 129; i < 65536; i++) { if (unitable[i] == 0 && (i < surrogate_min || i > surrogate_max)) @@ -86,7 +88,6 @@ END { } } - print "You blew it again!" > "/dev/stderr" fromgb = lastgb = unitable[128]; for (i = 129; i < 65536; i++) { -- 2.39.5