[PATCH] dlls/gdi32/fretype.c: Avoid division by zero.

Dmitry Timoshkov dmitry at baikal.ru
Fri May 3 23:38:18 CDT 2013


max at mtew.isa-geek.net wrote:

> +        if ( font->aveWidth && font->potm->otmTextMetrics.tmHeight ) {
> +            if (((font->aveWidth + font->potm->otmTextMetrics.tmHeight - 1) /
> +                 font->potm->otmTextMetrics.tmHeight) > 100) {
>                  WARN("Ignoring too large font->aveWidth %d\n", font->aveWidth);
>                  font->aveWidth = 0;
>              }

In which case font->potm->otmTextMetrics.tmHeight is going to be 0?

-- 
Dmitry.



More information about the wine-devel mailing list