Previously this was undefined, yet some code could trigger it. E.g. asking for the OS dictionary pop-up with an empty document.
I wasn’t sure if this should actually be allowed but decided that since operator[] returns strings, the “end of buffer” code point is easily defined as an empty string makes the code using this API simpler.
Unfortunately a printf precision specifier (‘%.*s’) can not come with a width specifier so we have to cast to int. The width specifier ‘t’ is used for ptrdiff_t.
The int → NSInteger change fixed a bug with popup menu positioning, but there was no associated warning or error. It's possible there are more such bugs that we haven't found yet!