aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-11 15:12:29 -0800
committerChris Robinson <[email protected]>2023-12-11 15:12:29 -0800
commite79e5a978df22a5e5967169cf62cf46f3456d833 (patch)
tree98145d7bd395ed1499f6b91f1f8101a50ba62edf
parentec40e4fefef954544c25285bfeae4a44c1134a44 (diff)
Fix size check
-rw-r--r--core/ambdec.cpp4
1 files 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<std::string> 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");