We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48c031a commit c1ce2bdCopy full SHA for c1ce2bd
src/main/java/aero/t2s/modes/decoder/Common.java
@@ -106,6 +106,9 @@ public static short[] getParity(short[] data) {
106
}
107
108
public static boolean isNotValid(short[] data) {
109
+ if(data.length < 3) {
110
+ return false; // fixes negative length bug where data is only 2 bytes (16bit Mode A/C replies, ACAS, ...)
111
+ }
112
short[] payload = Arrays.copyOfRange(data, 0, data.length - 3);
113
short[] parity = Arrays.copyOfRange(data, data.length - 3, data.length);
114
0 commit comments