Skip to content

Commit

Permalink
#61: Added check for data-less traces in legacy mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Siebje committed Oct 16, 2023
1 parent 4a57374 commit 740bf4a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/riscure/trs/TraceSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ public Trace get(int index) throws IOException {
//legacy mode
byte[] data = readData();
traceParameterMap = new TraceParameterMap();
traceParameterMap.put("LEGACY_DATA", data);
if (data.length > 0) {
traceParameterMap.put("LEGACY_DATA", data);
}
}

float[] samples = readSamples();
Expand Down

0 comments on commit 740bf4a

Please sign in to comment.