Lines 527-534
Link Here
|
527 |
aa = (slot->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY); |
527 |
aa = (slot->bitmap.pixel_mode == FT_PIXEL_MODE_GRAY); |
528 |
|
528 |
|
529 |
/* Add 1 pixel for the shadow on the medium font. Our sprite must be at least 1x1 pixel */ |
529 |
/* Add 1 pixel for the shadow on the medium font. Our sprite must be at least 1x1 pixel */ |
530 |
int width = max(1, slot->bitmap.width + (this->fs == FS_NORMAL)); |
530 |
int width = max(1u, slot->bitmap.width + (this->fs == FS_NORMAL)); |
531 |
int height = max(1, slot->bitmap.rows + (this->fs == FS_NORMAL)); |
531 |
int height = max(1u, slot->bitmap.rows + (this->fs == FS_NORMAL)); |
532 |
|
532 |
|
533 |
/* Limit glyph size to prevent overflows later on. */ |
533 |
/* Limit glyph size to prevent overflows later on. */ |
534 |
if (width > 256 || height > 256) usererror("Font glyph is too large"); |
534 |
if (width > 256 || height > 256) usererror("Font glyph is too large"); |