safer access

This commit is contained in:
jrkb 2023-08-04 10:01:56 +02:00
parent e66afd23b4
commit c36483ab21

View file

@ -358,8 +358,8 @@ bool Atlas::getGlyphGeometryPair(const unsigned char character,
const auto & closestVariationDown = variationSteps[closestIndexDown]; const auto & closestVariationDown = variationSteps[closestIndexDown];
GlyphVariationKey glyphKeyUp = {character, closestVariationUp}; GlyphVariationKey glyphKeyUp = {character, closestVariationUp};
GlyphVariationKey glyphKeyDown = {character, closestVariationDown}; GlyphVariationKey glyphKeyDown = {character, closestVariationDown};
int index_a = glyphGeometryMap[glyphKeyDown]; int index_a = glyphGeometryMap.at(glyphKeyDown);
int index_b = glyphGeometryMap[glyphKeyUp]; int index_b = glyphGeometryMap.at(glyphKeyUp);
a = glyphGeometries[index_a]; a = glyphGeometries[index_a];
b = glyphGeometries[index_b]; b = glyphGeometries[index_b];