Commit graph

2 commits

Author SHA1 Message Date
Phil Turnbull
e7662c2213 Handle out-of-bound read in utf16_iterate
Also simplify the test so we call `utf16_iterate` directly. Calling
`utf16_iterate` via `SpyInput` and `ts_document_parse` doesn't seem to reliably
trigger the problem using valgrind.

valgrind also doesn't detect the problem if we use a string literal like:
  `utf16_iterate("", 1, &code_point);`
2017-07-17 13:57:12 -07:00
Max Brunsfeld
f2e7058ad9 Support UTF16 directly
This makes the API easier to use from javascript
2015-12-28 13:53:22 -08:00