summaryrefslogtreecommitdiff
path: root/win/packaging/ca/CustomAction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'win/packaging/ca/CustomAction.cpp')
-rw-r--r--win/packaging/ca/CustomAction.cpp84
1 files changed, 42 insertions, 42 deletions
diff --git a/win/packaging/ca/CustomAction.cpp b/win/packaging/ca/CustomAction.cpp
index 67a17c2cc19..17bfca1debb 100644
--- a/win/packaging/ca/CustomAction.cpp
+++ b/win/packaging/ca/CustomAction.cpp
@@ -104,48 +104,48 @@ static void EscapeCommandLine(const wchar_t *in, wchar_t *out, size_t buflen)
}
pos= 0;
- for(int i = 0 ; ; i++)
- {
- size_t n_backslashes = 0;
- wchar_t c;
- while (in[i] == L'\\')
- {
- i++;
- n_backslashes++;
- }
-
- c= in[i];
- if (c == 0)
- {
- /*
- Escape all backslashes, but let the terminating double quotation mark
- that caller adds be interpreted as a metacharacter.
- */
- for(size_t j= 0; j < 2*n_backslashes;j++)
- {
- out[pos++]=L'\\';
- }
- break;
- }
- else if (c == L'"')
- {
- /*
- Escape all backslashes and the following double quotation mark.
- */
- for(size_t j= 0; j < 2*n_backslashes + 1; j++)
- {
- out[pos++]=L'\\';
- }
- out[pos++]= L'"';
- }
- else
- {
- /* Backslashes aren't special here. */
- for (size_t j=0; j < n_backslashes; j++)
- out[pos++] = L'\\';
-
- out[pos++]= c;
- }
+ for(int i = 0 ; ; i++)
+ {
+ size_t n_backslashes = 0;
+ wchar_t c;
+ while (in[i] == L'\\')
+ {
+ i++;
+ n_backslashes++;
+ }
+
+ c= in[i];
+ if (c == 0)
+ {
+ /*
+ Escape all backslashes, but let the terminating double quotation mark
+ that caller adds be interpreted as a metacharacter.
+ */
+ for(size_t j= 0; j < 2*n_backslashes;j++)
+ {
+ out[pos++]=L'\\';
+ }
+ break;
+ }
+ else if (c == L'"')
+ {
+ /*
+ Escape all backslashes and the following double quotation mark.
+ */
+ for(size_t j= 0; j < 2*n_backslashes + 1; j++)
+ {
+ out[pos++]=L'\\';
+ }
+ out[pos++]= L'"';
+ }
+ else
+ {
+ /* Backslashes aren't special here. */
+ for (size_t j=0; j < n_backslashes; j++)
+ out[pos++] = L'\\';
+
+ out[pos++]= c;
+ }
}
out[pos++]= 0;
}