imm32: ImmGetDescriptionA return does not include NULL byte.
This commit is contained in:
parent
66988a681a
commit
cae71ef219
|
@ -1540,7 +1540,10 @@ UINT WINAPI ImmGetDescriptionA(
|
|||
|
||||
HeapFree( GetProcessHeap(), 0, buf );
|
||||
|
||||
return len;
|
||||
if (len == 0)
|
||||
return 0;
|
||||
|
||||
return len - 1;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
@ -665,13 +665,16 @@ static void test_ImmGetDescription(void)
|
|||
|
||||
lret = ImmGetDescriptionA(hkl, descA, ret + 1);
|
||||
ok(lret, "ImmGetDescriptionA failed, expected != 0 received 0.\n");
|
||||
todo_wine ok(lret == ret, "ImmGetDescriptionA failed to return the correct amount of data. Expected %d, got %d.\n", ret, lret);
|
||||
ok(lret == ret, "ImmGetDescriptionA failed to return the correct amount of data. Expected %d, got %d.\n", ret, lret);
|
||||
|
||||
ret /= 2; /* try to copy partially */
|
||||
lret = ImmGetDescriptionW(hkl, descW, ret + 1);
|
||||
ok(lret, "ImmGetDescriptionW failed, expected != 0 received 0.\n");
|
||||
ok(lret == ret, "ImmGetDescriptionW failed to return the correct amount of data. Expected %d, got %d.\n", ret, lret);
|
||||
|
||||
lret = ImmGetDescriptionA(hkl, descA, ret + 1);
|
||||
ok(!lret, "ImmGetDescriptionA should fail\n");
|
||||
|
||||
ret = ImmGetDescriptionW(hkl, descW, 1);
|
||||
ok(!ret, "ImmGetDescriptionW failed, expected 0 received %d.\n", ret);
|
||||
|
||||
|
|
Loading…
Reference in New Issue