https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f0841e860facf1c9cca13…
commit f0841e860facf1c9cca1382e117c95edccc096db
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 00:03:59 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:03 2022 +0100
[WINESYNC] msi/tests: SQLGetInstalledDrivers fails if there are no ODBC drivers
installed.
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 1be65cbb46bf792773a5aabc550851ed51f727cd by Hans Leidekker
<hans(a)codeweavers.com>
---
modules/rostests/winetests/msi/custom.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/rostests/winetests/msi/custom.c
b/modules/rostests/winetests/msi/custom.c
index cd6cb0c3787..c7ce4d20aeb 100644
--- a/modules/rostests/winetests/msi/custom.c
+++ b/modules/rostests/winetests/msi/custom.c
@@ -1424,9 +1424,10 @@ UINT WINAPI odbc_present(MSIHANDLE hinst)
WORD len;
BOOL r;
+ buffer[0] = 0;
+ len = sizeof(buffer);
r = SQLGetInstalledDrivers(buffer, sizeof(buffer), &len);
- ok(hinst, len < sizeof(buffer), "buffer too small\n");
- ok(hinst, r, "SQLGetInstalledDrivers failed\n");
+ if (r) ok(hinst, len < sizeof(buffer), "buffer too small\n");
for (p = buffer; *p; p += strlen(p) + 1)
{
if (!strcmp(p, "ODBC test driver"))
@@ -1446,9 +1447,10 @@ UINT WINAPI odbc_absent(MSIHANDLE hinst)
WORD len;
BOOL r;
+ buffer[0] = 0;
+ len = sizeof(buffer);
r = SQLGetInstalledDrivers(buffer, sizeof(buffer), &len);
- ok(hinst, len < sizeof(buffer), "buffer too small\n");
- ok(hinst, r, "SQLGetInstalledDrivers failed\n");
+ if (r) ok(hinst, len < sizeof(buffer), "buffer too small\n");
for (p = buffer; *p; p += strlen(p) + 1)
{
if (!strcmp(p, "ODBC test driver"))