diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-10-27 13:20:31 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-10-27 13:20:31 +0000 |
commit | 5f026caaebc9445840f01b022d6447337a785865 (patch) | |
tree | 9087f2757da708d777513799d2316cee7cc4406c | |
parent | 736d3e129a1197415becf9b5b35be1b5ef6fa8b0 (diff) |
INTEGRATION: CWS idlcpp1 (1.12.2); FILE MERGED
2005/10/26 12:39:49 jsc 1.12.2.1: #i56422# take care of last option when EOF is directly behind them
-rw-r--r-- | idlc/source/options.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx index dd856547bbe9..31a25fb6c953 100644 --- a/idlc/source/options.cxx +++ b/idlc/source/options.cxx @@ -4,9 +4,9 @@ * * $RCSfile: options.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: rt $ $Date: 2005-10-17 13:20:57 $ + * last change: $Author: hr $ $Date: 2005-10-27 14:20:31 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -242,7 +242,7 @@ sal_Bool Options::initOptions(int ac, char* av[], sal_Bool bCmdFile) { int rargc=0; char* rargv[512]; - char buffer[512]; + char buffer[512]=""; int i=0; int found = 0; @@ -271,6 +271,12 @@ sal_Bool Options::initOptions(int ac, char* av[], sal_Bool bCmdFile) i=0; rargv[rargc]= strdup(buffer); rargc++; + buffer[0]='\0'; + } + if (buffer[0] != '\0') { + buffer[i]='\0'; + rargv[rargc]= strdup(buffer); + rargc++; } fclose(cmdFile); |