comctl32/toolbar.c: Fix Lingvo 9.0 crashes on startup [Resend 2]

Vladimir Pankratov scriptkid at mail.ru
Sun Jul 12 08:12:40 CDT 2009


Nikolay Sivov wrote:

> The very first one was better (when you fixed only division by zero).
> Now you're changing path earlier:
> ---
> + if(rows <= 0) rows = 1;
> ---
> There's no tests currently for that (<=0 isn't tested), could you add them (to test_setrows() I suppose)? 

What's write in this test?

Maybe something like this:

RECT rc;
int rows;

memset(&rc, 0xCC, sizeof(rc));
SendMessageA(hToolbar, TB_SETROWS, MAKEWPARAM(0, TRUE), (LPARAM) &rc);

rows = SendMessageA(hToolbar, TB_GETROWS, 0, 0);

ok(rows == 1, "Unexpected number of rows %d (expected %d)\n", rows, 1);

memset(&rc, 0xCC, sizeof(rc));
SendMessageA(hToolbar, TB_SETROWS, MAKEWPARAM(-1, TRUE), (LPARAM) &rc);

rows = SendMessageA(hToolbar, TB_GETROWS, 0, 0);

ok(rows == 1, "Unexpected number of rows %d (expected %d)\n", rows, 1);



More information about the wine-devel mailing list