Stop LNK4221 link warning with link=static.
Fixed MSVC static analyser warning about writing off the end of an array.