If one asks for zero bytes of text using SCI_GETTEXT
then Scintilla writes off the end of the buffer, corrupting
The cause of the error is fairly obviously the loop in
Editor::WndProc which loops from 0 to (wParam - 1)
using an unsigned loop counter. If wParam is zero, then
(wParam-1) is a very large unsigned integer value.
I suppose it is pointless asking for zero bytes of text,
but if writing generic routines one otherwise needs to
treat as a special case.