user32: GetTabbedTextExtent() returns non-zero value when nCount == 0.

This commit is contained in:
Tim Hentenaar 2011-04-23 07:36:12 -04:00 committed by Alexandre Julliard
parent e0a60312d1
commit a415974b2e
2 changed files with 5 additions and 0 deletions

View File

@ -617,6 +617,9 @@ static void test_TabbedText(void)
ret = GetTextMetricsA( hdc, &tm);
ok( ret, "GetTextMetrics error %u\n", GetLastError());
extent = GetTabbedTextExtentA( hdc, "x", 0, 1, tabs);
ok( extent == 0, "GetTabbedTextExtentA returned non-zero on nCount == 0\n");
extent = GetTabbedTextExtentA( hdc, "x", 1, 1, tabs);
cx = LOWORD( extent);
cy = HIWORD( extent);

View File

@ -1281,6 +1281,8 @@ static LONG TEXT_TabbedTextOut( HDC hdc, INT x, INT y, LPCWSTR lpstr,
int i, j;
int start = x;
if (!lpstr || count == 0) return 0;
if (!lpTabPos)
cTabStops=0;