From aaafbc79595a04c88344850fb83657ad402ea729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20B=C3=A9ron?= Date: Mon, 19 Jul 2004 20:05:54 +0000 Subject: [PATCH] Cleanup of the properties last space removal, since it can be used not only with Install. --- programs/msiexec/msiexec.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/programs/msiexec/msiexec.c b/programs/msiexec/msiexec.c index a01cbb56741..79b546a4a85 100644 --- a/programs/msiexec/msiexec.c +++ b/programs/msiexec/msiexec.c @@ -283,19 +283,20 @@ int main(int argc, char *argv[]) } } + if(Properties[strlen(Properties)-1] == ' ') + { + Properties[strlen(Properties)-1] = 0; + TempStr = HeapReAlloc(GetProcessHeap(), 0, Properties, HeapSize(GetProcessHeap(), 0, Properties)-1); + if(!TempStr) + { + fprintf(stderr, "Out of memory!\n"); + ExitProcess(1); + } + Properties = TempStr; + } + if(FunctionInstall) { - if(Properties[strlen(Properties)-1] == ' ') - { - Properties[strlen(Properties)-1] = 0; - TempStr = HeapReAlloc(GetProcessHeap(), 0, Properties, HeapSize(GetProcessHeap(), 0, Properties)-1); - if(!TempStr) - { - fprintf(stderr, "Out of memory!\n"); - ExitProcess(1); - } - Properties = TempStr; - } if(GotProductCode) { WINE_FIXME("Product code treatment not implemented yet\n");