Commit a415974b authored by Tim Hentenaar's avatar Tim Hentenaar Committed by Alexandre Julliard

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

parent e0a60312
......@@ -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);
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment