Fix bound check of aspect ratio type

This commit is contained in:
Martchus 2017-08-17 18:48:17 +02:00
parent 5aa5ccb6eb
commit d02b3ffcf4
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ AspectRatio::AspectRatio(byte aspectRatioType)
AspectRatio(64, 33), AspectRatio(160, 99), AspectRatio(4, 3), AspectRatio(3, 2),
AspectRatio(2, 1)
};
if(aspectRatioType < sizeof(predefinedPars)) {
if(aspectRatioType < (sizeof(predefinedPars) / sizeof(AspectRatio))) {
*this = predefinedPars[aspectRatioType];
} else {
numerator = denominator = 0;