erkyrath / glkote

A Javascript display library for IF interfaces
http://eblong.com/zarf/glk/glkote.html
MIT License
26 stars 11 forks source link

Unicode functions are not TypedArray safe. #27

Open curiousdannii opened 7 years ago

curiousdannii commented 7 years ago

The truncation tests in unicasetest.inf fail if glk_buffer_canon_normalize_uni is passed a Uint32Array. Possibly the other functions would fail under the right circumstances, so I'm going to pass normal arrays to all of them just to be safe.

(I know GlkApi wasn't written to be used with TypedArrays, so it's a testament to its quality that everything else up until this point has worked!)

erkyrath commented 7 years ago

Right, all of that code was written before I had any experience of typed arrays.

One day there will be a big conversion effort.