Skip to content

Commit 52192be

Browse files
author
Robert Henigan
authored
Make sure errorCode is not cut off (#1791)
1 parent 5a3a650 commit 52192be

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

base/src/main/java/com/smartdevicelink/protocol/SecurityQueryPayload.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,7 @@ public static SecurityQueryPayload parseBinaryQueryHeader(byte[] binHeader) {
6161

6262
//Get the binaryData after the header (after 96 bits) and the jsonData size
6363
if (binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE > 0) {
64-
byte[] _bulkData;
65-
if (msg.getQueryType() == SecurityQueryType.NOTIFICATION && msg.getQueryID() == SecurityQueryID.SEND_INTERNAL_ERROR) {
66-
_bulkData = new byte[binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE - 1];
67-
} else {
68-
_bulkData = new byte[binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE];
69-
}
64+
byte[] _bulkData = new byte[binHeader.length - _jsonSize - SECURITY_QUERY_HEADER_SIZE];
7065
System.arraycopy(binHeader, SECURITY_QUERY_HEADER_SIZE + _jsonSize, _bulkData, 0, _bulkData.length);
7166
msg.setBulkData(_bulkData);
7267
}

0 commit comments

Comments
 (0)