mirror of https://github.com/decompals/wibo.git
Added quotation mark check in files::pathFromWindows (#77)
* Added quotation mark check in files::pathFromWindows * Moved quotation mark logic to createprocess argument processing code
This commit is contained in:
parent
701134e596
commit
bcc6eae470
|
@ -226,6 +226,20 @@ namespace kernel32 {
|
||||||
// to prevent from doubling up on the target executable name
|
// to prevent from doubling up on the target executable name
|
||||||
// (it appears as lpApplicationName, and as the first token in lpCommandLine)
|
// (it appears as lpApplicationName, and as the first token in lpCommandLine)
|
||||||
arg = strtok(NULL, " ");
|
arg = strtok(NULL, " ");
|
||||||
|
|
||||||
|
if (arg) {
|
||||||
|
// Trim all quotation marks from the start and the end of the string
|
||||||
|
while(*arg == '\"') {
|
||||||
|
arg++;
|
||||||
|
}
|
||||||
|
|
||||||
|
char* end = arg + strlen(arg) - 1;
|
||||||
|
while(end > arg && *end == '\"') {
|
||||||
|
*end = '\0';
|
||||||
|
end--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
argv[current_arg_index++] = arg;
|
argv[current_arg_index++] = arg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue