From 4f65e42b5746b7f327bcab26db5fab02e8f2c546 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 6 Jan 2008 16:14:39 +0000 Subject: * driver/main.c (main) [__WIN32__]: Fix off-by-one thinko. --- src/ChangeLog | 4 ++++ src/driver/main.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 55e167f6..9c7ce445 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-01-06 Gabriel Dos Reis + + * driver/main.c (main) [__WIN32__]: Fix off-by-one thinko. + 2008-01-05 Gabriel Dos Reis * scripts/axiom.in: Remove. diff --git a/src/driver/main.c b/src/driver/main.c index 12e8434a..313f9115 100644 --- a/src/driver/main.c +++ b/src/driver/main.c @@ -155,16 +155,16 @@ main(int argc, char* argv[]) command_line = (char*) malloc(command_line_length + 1); strcpy(command_line, argv[0]); - command_line[++cur] = ' '; + command_line[cur++] = ' '; /* Now start arguments to the core executable. */ - command_line[++cur] = '-'; - command_line[++cur] = '-'; + command_line[cur++] = '-'; + command_line[cur++] = '-'; /* Concatenate the arguments into a single string. */ for (i = 1; i < argc; ++i) { const int arg_length = strlen(argv[i]); - command_line[++cur] = ' '; + command_line[cur++] = ' '; /* Note that strcpy will terminate `command_line' with a NUL character, and since the next iteration will write the blank precisely where the NUL character is, the whole command -- cgit v1.2.3