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 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