nooo nooo. it was right. we're not allocating an array of poitners to char.
we're allocating an array (or reallocing in this case) an array of char's of size (size +1 amd size +2 respectively) :) SVN revision: 5544
This commit is contained in:
parent
9a286bac43
commit
9fdc2d4c99
|
@ -2341,13 +2341,13 @@ ecore_window_get_command(Window win)
|
|||
|
||||
s = NULL;
|
||||
size = strlen(cargv[0]);
|
||||
REALLOC(s, char *, size + 1);
|
||||
REALLOC(s, char, size + 1);
|
||||
|
||||
strcpy(s, cargv[0]);
|
||||
for (i = 1; i < cargc; i++)
|
||||
{
|
||||
size += strlen(cargv[i]);
|
||||
REALLOC(s, char *, size + 2);
|
||||
REALLOC(s, char, size + 2);
|
||||
|
||||
strcat(s, " ");
|
||||
strcat(s, cargv[i]);
|
||||
|
|
Loading…
Reference in New Issue