Patch from Antoni Mylka from bug #51535 - correct signed vs unsigned short reading in NDocumentInputStream