bugfix M.Z.
This commit is contained in:
10
splitter.c
10
splitter.c
@ -336,9 +336,9 @@ typedef enum _CharType {eSpace, eNum,eeText,eQuote} CharType;
|
||||
{
|
||||
int i, iBufCount = 0;
|
||||
|
||||
strcpy(buf,"\0");
|
||||
if(argc < 1)
|
||||
{
|
||||
strcpy(buf,"\0");
|
||||
return 1;
|
||||
}
|
||||
if(strlen(argv[0]) < iBufLen)
|
||||
@ -353,17 +353,13 @@ typedef enum _CharType {eSpace, eNum,eeText,eQuote} CharType;
|
||||
|
||||
for(i = 1; i < argc; i++)
|
||||
{
|
||||
strcat(buf," ");
|
||||
iBufCount += strlen(argv[i]) + 1;
|
||||
if(iBufCount >= iBufLen)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
strcat(buf,argv[i]);
|
||||
/* strcat(buf," "); */
|
||||
}
|
||||
strcat(buf," ");
|
||||
strcat(buf,argv[i]);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user