[Wine-patches] [eter-2.1 2/2] msi: Make sure to reset the 'in_quotes' state in all cases. (eterbug #8375).

Dmitry Timoshkov dtimoshkov на etersoft.ru
Чт Ноя 5 09:06:02 MSK 2015


This patch should properly fix parsing of tokens with embedded double quotes.
---
 dlls/msi/action.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 16112df..c27de48 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -254,8 +254,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
                 len++;
                 break;
             default:
-                if (!count) in_quotes = 0;
-                else in_quotes = 1;
+                if (count) in_quotes = TRUE;
                 len++;
                 break;
             }
@@ -276,8 +275,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
                 break;
             default:
                 state = state_token;
-                if (!count) in_quotes = 0;
-                else in_quotes = 1;
+                if (count) in_quotes = TRUE;
                 len++;
                 break;
             }
@@ -286,6 +284,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
         default: break;
         }
         if (!ignore) *out++ = *p;
+        if (!count) in_quotes = FALSE;
     }
 
 done:
-- 
2.6.2



Подробная информация о списке рассылки Wine-patches