James Hawkins : msi: Fix skipping a NULL record.

Alexandre Julliard julliard at winehq.org
Tue Feb 26 05:45:14 CST 2008


Module: wine
Branch: master
Commit: 45d7d6a4e19d0ac844bfc52d87a8feecfb592291
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=45d7d6a4e19d0ac844bfc52d87a8feecfb592291

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Mon Feb 25 14:57:23 2008 -0600

msi: Fix skipping a NULL record.

---

 dlls/msi/format.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dlls/msi/format.c b/dlls/msi/format.c
index 128f159..8c5b246 100644
--- a/dlls/msi/format.c
+++ b/dlls/msi/format.c
@@ -544,6 +544,10 @@ static FORMSTR *format_replace(FORMAT *format, BOOL propfound, BOOL nonprop,
     format->deformatted = str;
     format->len = size - 1;
 
+    /* don't reformat the NULL */
+    if (replace && !*replace)
+        format->n++;
+
     if (!replace)
         return NULL;
 
@@ -727,9 +731,6 @@ static UINT replace_stack(FORMAT *format, STACK *stack, STACK *values)
     msi_free(replaced);
     format->n = beg->n + beg->len;
 
-    if (type == FORMAT_PROPNULL)
-        format->n++;
-
     top = stack_peek(stack);
     if (top)
     {




More information about the wine-cvs mailing list