r210 - trunk/code/tools/lcc/etc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Nov 1 21:08:29 EST 2005
Author: tma
Date: 2005-11-01 21:08:29 -0500 (Tue, 01 Nov 2005)
New Revision: 210
Modified:
trunk/code/tools/lcc/etc/lcc.c
Log:
* Fix for lcc on windows so that it can execute files with spaces in them
Modified: trunk/code/tools/lcc/etc/lcc.c
===================================================================
--- trunk/code/tools/lcc/etc/lcc.c 2005-11-01 22:09:15 UTC (rev 209)
+++ trunk/code/tools/lcc/etc/lcc.c 2005-11-02 02:08:29 UTC (rev 210)
@@ -256,6 +256,7 @@
int i, status = 0;
static char **argv;
static int argc;
+ char *executable;
for (i = 0; av[i] != NULL; i++)
;
@@ -281,6 +282,8 @@
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 @@
}
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);
More information about the quake3-commits
mailing list