Skip to content

Commit

Permalink
Make sure errorCode is not cut off
Browse files Browse the repository at this point in the history
  • Loading branch information
RHenigan committed Feb 22, 2022
1 parent e5398b4 commit db04b82
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,7 @@ public static SecurityQueryPayload parseBinaryQueryHeader(byte[] binHeader) {

//Get the binaryData after the header (after 96 bits) and the jsonData size
if (binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE > 0) {
byte[] _bulkData;
if (msg.getQueryType() == SecurityQueryType.NOTIFICATION && msg.getQueryID() == SecurityQueryID.SEND_INTERNAL_ERROR) {
_bulkData = new byte[binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE - 1];
} else {
_bulkData = new byte[binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE];
}
byte[] _bulkData = new byte[binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE];
System.arraycopy(binHeader, SECURITY_QUERY_HEADER_SIZE + _jsonSize, _bulkData, 0, _bulkData.length);
msg.setBulkData(_bulkData);
}
Expand Down

0 comments on commit db04b82

Please sign in to comment.