usp10/tests: Reserve for InClass a byte for every character in teststr. (v3)
Huw Davies
huw at codeweavers.com
Fri Aug 5 05:03:02 CDT 2016
On Fri, Aug 05, 2016 at 12:50:10AM +0200, Bernhard Übelacker wrote:
> diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
> index 6b2152f..971e275 100644
> --- a/dlls/usp10/tests/usp10.c
> +++ b/dlls/usp10/tests/usp10.c
> @@ -2900,7 +2900,7 @@ static void test_ScriptString(HDC hdc)
> DWORD Flags = SSA_GLYPHS;
> int ReqWidth = 100;
> const int Dx[5] = {10, 10, 10, 10, 10};
> - const BYTE InClass = 0;
> + static const BYTE InClass[8]; /* Array size needs to be at least equal to String_len */
And yet len == 10 in this case ;-)
How about:
static const BYTE InClass[ (sizeof(teststr) / sizeof(WCHAR)) - 1 ];
Of course now I've noticed Dx[5], that's clearly wrong. The sdk
has it marked as _In_reads_opt_(cString), so I suggest marking this
the same length too.
Huw.
More information about the wine-devel
mailing list