From 4de57c2a512ba9e03d45c452ba774ec79878db7b Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 17 Jun 2026 08:59:02 +0200 Subject: [PATCH 1/2] Fix conversion to int --- src/pyxdf/pyxdf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyxdf/pyxdf.py b/src/pyxdf/pyxdf.py index 4da53ec..abbba6a 100644 --- a/src/pyxdf/pyxdf.py +++ b/src/pyxdf/pyxdf.py @@ -695,7 +695,7 @@ def _truncate_corrupted_offsets(temp, streams): sample_count_str = footer.get("sample_count", [None])[0] if sample_count_str is None: continue - footer_count = int(sample_count_str) + footer_count = int(float(sample_count_str)) # can be with .0 suffix if len(stream.time_stamps) <= footer_count: continue # No extra samples → no evidence of pylsl#67, liblsl#246 From 97b6b2e8733f32d6a494bac05967617b16bc0ba4 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Wed, 17 Jun 2026 09:00:20 +0200 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26229fb..a247427 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,6 @@ ## [UNRELEASED] - YYYY-MM-DD +### Fixed +- Fix conversion to `int` for `sample_count` in XDF footer ([#173](https://github.com/xdf-modules/pyxdf/pull/173) by [Clemens Brunner](https://github.com/cbrnr)) ## [1.17.5] - 2026-06-15 ### Changed