From 42100c8f189d315ce9604d852a5201ebc334c898 Mon Sep 17 00:00:00 2001 From: Anne van Kesteren Date: Thu, 30 Aug 2018 12:00:49 +0200 Subject: [PATCH] gb18030 decoder: unset state before returning Due to an oversight in #111 the gb18030 decoder didn't always reset state before returning after a four-byte sequence. Fixes #146. --- encoding.bs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/encoding.bs b/encoding.bs index 068f964..db2a0f9 100644 --- a/encoding.bs +++ b/encoding.bs @@ -2087,6 +2087,8 @@ consumers of content generated with GBK's encoder. ((gb18030 second − 0x30) × (10 × 126)) + ((gb18030 third − 0x81) × 10) + byte − 0x30. +
  • Set gb18030 first, gb18030 second, and gb18030 third to 0x00. +

  • If code point is null, return error.

  • Return a code point whose value is code point. @@ -3167,6 +3169,7 @@ Boris Zbarsky, Bruno Haible, Cameron McCormack, Charles McCathieNeville, +Christopher Foo, David Carlisle, Domenic Denicola, Dominique Hazaël-Massieux,