Skip to content

Commit

Permalink
Range check in OTProcessor#getClassID
Browse files Browse the repository at this point in the history
  • Loading branch information
devongovett committed Mar 20, 2017
1 parent f2a6899 commit 26f99b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/opentype/OTProcessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ export default class OTProcessor {
switch (classDef.version) {
case 1: // Class array
let i = glyph - classDef.startGlyph;
if (i < classDef.classValueArray.length) {
if (i >= 0 && i < classDef.classValueArray.length) {
return classDef.classValueArray[i];
}

Expand Down

0 comments on commit 26f99b8

Please sign in to comment.