From e79e5a978df22a5e5967169cf62cf46f3456d833 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 11 Dec 2023 15:12:29 -0800 Subject: Fix size check --- core/ambdec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ambdec.cpp b/core/ambdec.cpp index ea369d38..8242cf02 100644 --- a/core/ambdec.cpp +++ b/core/ambdec.cpp @@ -286,8 +286,8 @@ std::optional AmbDecConf::load(const char *fname) noexcept if(!is_at_end(buffer, endpos)) return make_error(linenum, "Extra junk on end: %s", buffer.substr(endpos).c_str()); - if(speaker_pos < Speakers.empty() || hfmatrix_pos < Speakers.empty() - || (FreqBands == 2 && lfmatrix_pos < Speakers.empty())) + if(speaker_pos < Speakers.size() || hfmatrix_pos < Speakers.size() + || (FreqBands == 2 && lfmatrix_pos < Speakers.size())) return make_error(linenum, "Incomplete decoder definition"); if(CoeffScale == AmbDecScale::Unset) return make_error(linenum, "No coefficient scaling defined"); -- cgit v1.2.3