Skip to content

Commit

Permalink
gb18030 decoder: unset state before returning
Browse files Browse the repository at this point in the history
Due to an oversight in #111 the gb18030 decoder didn't always reset state before returning after a four-byte sequence.

Fixes #146.
  • Loading branch information
annevk committed Aug 30, 2018
1 parent b579018 commit 42100c8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions encoding.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2087,6 +2087,8 @@ consumers of content generated with <a>GBK</a>'s <a for=/>encoder</a>.
((<a>gb18030 second</a> &minus; 0x30) × (10 × 126)) +
((<a>gb18030 third</a> &minus; 0x81) × 10) + <var>byte</var> &minus; 0x30.

<li><p>Set <a>gb18030 first</a>, <a>gb18030 second</a>, and <a>gb18030 third</a> to 0x00.

<li><p>If <var>code point</var> is null, return <a>error</a>.

<li><p>Return a code point whose value is <var>code point</var>.
Expand Down Expand Up @@ -3167,6 +3169,7 @@ Boris Zbarsky,
Bruno Haible,
Cameron McCormack,
Charles McCathieNeville,
Christopher Foo,
David Carlisle,
Domenic Denicola,
Dominique Hazaël-Massieux,
Expand Down

0 comments on commit 42100c8

Please sign in to comment.