From 784d1a39712e094ce2017470156645bb84809089 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Sat, 7 Mar 2020 11:48:03 +0100 Subject: [PATCH] Adapt to the parser rework --- src/sfizz/Curve.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/sfizz/Curve.cpp b/src/sfizz/Curve.cpp index 0c077b1a..355d660b 100644 --- a/src/sfizz/Curve.cpp +++ b/src/sfizz/Curve.cpp @@ -32,13 +32,11 @@ Curve Curve::buildCurveFromHeader( setPoint(NumValues - 1, 1.0); for (const Opcode& opc : members) { - unsigned index; - - if (opc.lettersOnlyHash != hash("v")) + if (opc.lettersOnlyHash != hash("v&")) continue; - auto indexOpt = opc.backParameter(); - if (!indexOpt || (index = *indexOpt) >= NumValues) + unsigned index = opc.parameters.back(); + if (index >= NumValues) continue; auto valueOpt = readOpcode(opc.value, fullRange);