Robert Shearman : msi: An empty string is equivalent to nil,
so handle this in the optimised WHERE_execute path.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Jun 5 07:28:14 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: d70db020a6d961b8266fbd780e42409064e4e6e0
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=d70db020a6d961b8266fbd780e42409064e4e6e0
Author: Robert Shearman <rob at codeweavers.com>
Date: Mon Jun 5 01:41:04 2006 +0100
msi: An empty string is equivalent to nil, so handle this in the optimised WHERE_execute path.
---
dlls/msi/where.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/where.c b/dlls/msi/where.c
index 6fa70a3..a02b19b 100644
--- a/dlls/msi/where.c
+++ b/dlls/msi/where.c
@@ -265,11 +265,17 @@ static UINT WHERE_execute( struct tagMSI
if ((col_cond->type == EXPR_COL_NUMBER_STRING) && (val_cond->type == EXPR_SVAL))
{
col = col_cond->u.col_number;
- r = msi_string2idW(wv->db->strings, val_cond->u.sval, &value);
- if (r != ERROR_SUCCESS)
+ /* special case for "" - translate it into nil */
+ if (!val_cond->u.sval[0])
+ value = 0;
+ else
{
- TRACE("no id for %s, assuming it doesn't exist in the table\n", debugstr_w(wv->cond->u.expr.right->u.sval));
- return ERROR_SUCCESS;
+ r = msi_string2idW(wv->db->strings, val_cond->u.sval, &value);
+ if (r != ERROR_SUCCESS)
+ {
+ TRACE("no id for %s, assuming it doesn't exist in the table\n", debugstr_w(wv->cond->u.expr.right->u.sval));
+ return ERROR_SUCCESS;
+ }
}
do
More information about the wine-cvs
mailing list