fix crashes when pkt_id 1 is dropped (#33)

Signed-off-by: Tin Lai <tin@tinyiu.com>
Co-authored-by: Tin Lai <tin@tinyiu.com>
This commit is contained in:
Tin Lai
2024-07-04 11:27:06 +02:00
committed by GitHub
co-authored by Tin Lai
parent 8f19d215ba
commit 9f6f0ca8fa
+1 -1
View File
@@ -269,7 +269,7 @@ const deal_with_data = (session: Session, dv: DataView) => {
return;
}
if (session.curImage.length == 1) return; // header does not have markers
if (session.curImage.length <= 1) return; // header does not have markers
let lastFrameSlice = session.curImage[session.curImage.length - 1];
const lastResetMarker = findAllResetMarkers(lastFrameSlice).pop();