diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-09-26 13:07:59 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-09-26 13:09:44 +0400 |
commit | 8f6a99376961175a02d94088cc5df3feeb762e36 (patch) | |
tree | 5e233d8230e371d7b37997d54b2ed03c5c64220f /source/creator | |
parent | d65350015237a257c57421772e84c878d84314b2 (diff) |
Fix T41962: Command-line without specified filename doesn't renders
Issue was caused by the launcher not dealing with slashes in the way
windows expects them to be handled -- last slash of the path considered
an escape character for the following qoute.
This is definitely to be ported to the 2.72 release.
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/creator_launch_win.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/creator/creator_launch_win.c b/source/creator/creator_launch_win.c index a7e04b2dafc..03f28cd4034 100644 --- a/source/creator/creator_launch_win.c +++ b/source/creator/creator_launch_win.c @@ -58,9 +58,14 @@ int main(int argc, const char **UNUSED(argv_c)) wcsncpy(command, BLENDER_BINARY, len - 1); len -= wcslen(BLENDER_BINARY); for (i = 1; i < argc; ++i) { + size_t argument_len = wcslen(argv_16[i]); wcsncat(command, L" \"", len - 2); wcsncat(command, argv_16[i], len - 3); - len -= wcslen(argv_16[i]) + 1; + len -= argument_len + 1; + if (argv_16[i][argument_len - 1] == '\\') { + wcsncat(command, L"\\", len - 1); + len--; + } wcsncat(command, L"\"", len - 1); } |