From 7578ce60159815ea2077212726dddb64ac8d1dbb Mon Sep 17 00:00:00 2001 From: freq-mod <32672779+freq-mod@users.noreply.github.com> Date: Sat, 26 Oct 2024 18:20:01 +0200 Subject: [PATCH] fix pzi import previously it didnt import most of the samples --- src/engine/fileOps/pzi.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/engine/fileOps/pzi.cpp b/src/engine/fileOps/pzi.cpp index 906e1f43b..297d4f274 100644 --- a/src/engine/fileOps/pzi.cpp +++ b/src/engine/fileOps/pzi.cpp @@ -108,8 +108,7 @@ void DivEngine::loadPZI(SafeReader& reader, std::vector& ret, String for(int i = 0; i < PZI_BANK_SIZE; i++) { - if (headers[i].start_pointer < MAX_SANITY_CAP && headers[i].sample_length < MAX_SANITY_CAP && - headers[i].loop_start < MAX_SANITY_CAP && headers[i].loop_end < MAX_SANITY_CAP && + if (headers[i].start_pointer < MAX_SANITY_CAP && headers[i].sample_length < MAX_SANITY_CAP && headers[i].start_pointer > 0 && headers[i].sample_length > 0) { DivSample* s = new DivSample; @@ -152,4 +151,4 @@ void DivEngine::loadPZI(SafeReader& reader, std::vector& ret, String lastError=_("premature end of file"); logE("premature end of file"); } -} \ No newline at end of file +}