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 LaiandTin Lai authored and GitHub committed 2024-07-04 11:27:06 +02:00
1 parent 8f19d215ba
commit 9f6f0ca8fa
1 file changed
+1 -1
+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();