[PATCH] user32/text: Stop crash when Tab Length is zero
Alexandre Julliard
julliard at winehq.org
Tue Mar 1 02:42:44 CST 2016
Alistair Leslie-Hughes <leslie_alistair at hotmail.com> writes:
> @@ -948,7 +948,7 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
>
> if (flags & DT_EXPANDTABS)
> {
> - int tabstop = ((flags & DT_TABSTOP) && dtp) ? dtp->iTabLength : 8;
> + int tabstop = ((flags & DT_TABSTOP) && dtp && dtp->iTabLength) ? dtp->iTabLength : 8;
You should test the resulting text size to show that this is the correct
behavior.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list