From c36483ab21fe97509d2b8c26ffa847ed9882b2d5 Mon Sep 17 00:00:00 2001 From: themancalledjakob Date: Fri, 4 Aug 2023 10:01:56 +0200 Subject: [PATCH] safer access --- src/Atlas.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Atlas.cpp b/src/Atlas.cpp index b2c3e25..c6ffaf8 100644 --- a/src/Atlas.cpp +++ b/src/Atlas.cpp @@ -358,8 +358,8 @@ bool Atlas::getGlyphGeometryPair(const unsigned char character, const auto & closestVariationDown = variationSteps[closestIndexDown]; GlyphVariationKey glyphKeyUp = {character, closestVariationUp}; GlyphVariationKey glyphKeyDown = {character, closestVariationDown}; - int index_a = glyphGeometryMap[glyphKeyDown]; - int index_b = glyphGeometryMap[glyphKeyUp]; + int index_a = glyphGeometryMap.at(glyphKeyDown); + int index_b = glyphGeometryMap.at(glyphKeyUp); a = glyphGeometries[index_a]; b = glyphGeometries[index_b];