aboutsummaryrefslogtreecommitdiffstats
path: root/code/tools
diff options
context:
space:
mode:
authortma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-02 02:08:29 +0000
committertma <tma@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-02 02:08:29 +0000
commitb1e23b0a409a0124452193edfe34335a08e77683 (patch)
treeb6b6810262ba33ca9ab1a39c86745a6d97ad74a3 /code/tools
parentca1f5fcecdda1f33668825d35fdddcf371ba3bdf (diff)
downloadioquake3-aero-b1e23b0a409a0124452193edfe34335a08e77683.tar.gz
ioquake3-aero-b1e23b0a409a0124452193edfe34335a08e77683.zip
* Fix for lcc on windows so that it can execute files with spaces in them
git-svn-id: svn://svn.icculus.org/quake3/trunk@210 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/tools')
-rw-r--r--code/tools/lcc/etc/lcc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/code/tools/lcc/etc/lcc.c b/code/tools/lcc/etc/lcc.c
index 1738c36..cac01b9 100644
--- a/code/tools/lcc/etc/lcc.c
+++ b/code/tools/lcc/etc/lcc.c
@@ -256,6 +256,7 @@ static int callsys(char **av) {
int i, status = 0;
static char **argv;
static int argc;
+ char *executable;
for (i = 0; av[i] != NULL; i++)
;
@@ -281,6 +282,8 @@ static int callsys(char **av) {
i++;
}
argv[j] = NULL;
+ executable = strsave( argv[0] );
+ argv[0] = stringf( "\"%s\"", argv[0] );
if (verbose > 0) {
int k;
fprintf(stderr, "%s", argv[0]);
@@ -290,9 +293,9 @@ static int callsys(char **av) {
}
if (verbose < 2)
#ifndef WIN32
- status = _spawnvp(_P_WAIT, argv[0], argv);
+ status = _spawnvp(_P_WAIT, executable, argv);
#else
- status = _spawnvp(_P_WAIT, argv[0], (const char* const*)argv);
+ status = _spawnvp(_P_WAIT, executable, (const char* const*)argv);
#endif
if (status == -1) {
fprintf(stderr, "%s: ", progname);