From 63d29eb79b3225ff96f1d8e5abd999cbe9540321 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 9 Aug 2002 01:14:23 +0000 Subject: [PATCH] Fixed string lengths to do the right thing for all platforms. --- dlls/shlwapi/tests/shreg.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/shlwapi/tests/shreg.c b/dlls/shlwapi/tests/shreg.c index 5cd628c45b2..fd7635a9947 100644 --- a/dlls/shlwapi/tests/shreg.c +++ b/dlls/shlwapi/tests/shreg.c @@ -49,9 +49,9 @@ static void create_test_entrys(void) if (hKey) { - ok(!RegSetValueExA(hKey,"Test1",0,REG_EXPAND_SZ, sTestpath1, strlen(sTestpath1)), "RegSetValueExA failed"); - ok(!RegSetValueExA(hKey,"Test2",0,REG_SZ, sTestpath1, strlen(sTestpath1)), "RegSetValueExA failed"); - ok(!RegSetValueExA(hKey,"Test3",0,REG_EXPAND_SZ, sTestpath2, strlen(sTestpath2)), "RegSetValueExA failed"); + ok(!RegSetValueExA(hKey,"Test1",0,REG_EXPAND_SZ, sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed"); + ok(!RegSetValueExA(hKey,"Test2",0,REG_SZ, sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed"); + ok(!RegSetValueExA(hKey,"Test3",0,REG_EXPAND_SZ, sTestpath2, strlen(sTestpath2)+1), "RegSetValueExA failed"); RegCloseKey(hKey); } @@ -108,8 +108,8 @@ static void test_SHQUeryValueEx(void) /****** SHQueryValueExA ******/ sTestedFunction = "SHQueryValueExA"; - nUsedBuffer1 = max(strlen(sExpTestpath1)+1, strlen(sTestpath1)); - nUsedBuffer2 = max(strlen(sExpTestpath2)+1, strlen(sTestpath2)); + nUsedBuffer1 = max(strlen(sExpTestpath1)+1, strlen(sTestpath1)+1); + nUsedBuffer2 = max(strlen(sExpTestpath2)+1, strlen(sTestpath2)+1); /* * Case 1.1 All arguments are NULL */