Fix `warning C4267: '=': conversion from 'size_t' to 'USHORT', possible loss of data` by explicitly casting to USHORT. This is OK as the line immediately before NULL-terminates the buffer within boundary. Addendum to commit 096a69471 (r6279).
096a69471