From b1839561930f04c4161bbe19d0b74c445de5bb73 Mon Sep 17 00:00:00 2001 From: Mike McCormack Date: Tue, 29 Aug 2006 17:08:40 +0900 Subject: [PATCH] msi: Properties are case sensitive. --- dlls/msi/package.c | 4 ++-- dlls/msi/tests/package.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 871ccbf268a..c700bbfd867 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -852,7 +852,7 @@ static UINT msi_prop_makehash( const WCHAR *str ) while( *str ) { - hash ^= tolowerW( *str++ ); + hash ^= *str++; hash *= 53; hash = (hash<<5) | (hash>>27); } @@ -865,7 +865,7 @@ static msi_property *msi_prop_find( MSIPACKAGE *package, LPCWSTR key ) msi_property *prop; LIST_FOR_EACH_ENTRY( prop, &package->props[hash], msi_property, entry ) - if (!lstrcmpiW( prop->key, key )) + if (!lstrcmpW( prop->key, key )) return prop; return NULL; } diff --git a/dlls/msi/tests/package.c b/dlls/msi/tests/package.c index 7856a62ae37..bee29012671 100644 --- a/dlls/msi/tests/package.c +++ b/dlls/msi/tests/package.c @@ -1354,6 +1354,27 @@ static void test_props(void) ok( !strcmp(buffer,"xy"), "buffer was not changed\n"); ok( sz == 3, "wrong size returned\n"); + r = MsiSetProperty(hpkg, "SourceDir", "foo"); + ok( r == ERROR_SUCCESS, "wrong return val\n"); + + sz = 4; + r = MsiGetProperty(hpkg, "SOURCEDIR", buffer, &sz); + ok( r == ERROR_SUCCESS, "wrong return val\n"); + ok( !strcmp(buffer,""), "buffer wrong\n"); + ok( sz == 0, "wrong size returned\n"); + + sz = 4; + r = MsiGetProperty(hpkg, "SOMERANDOMNAME", buffer, &sz); + ok( r == ERROR_SUCCESS, "wrong return val\n"); + ok( !strcmp(buffer,""), "buffer wrong\n"); + ok( sz == 0, "wrong size returned\n"); + + sz = 4; + r = MsiGetProperty(hpkg, "SourceDir", buffer, &sz); + ok( r == ERROR_SUCCESS, "wrong return val\n"); + ok( !strcmp(buffer,"foo"), "buffer wrong\n"); + ok( sz == 3, "wrong size returned\n"); + MsiCloseHandle( hpkg ); DeleteFile(msifile); } -- 2.11.4.GIT