Oops. A few other fixes.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@546 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c48aeeb69b
commit
03ad301392
1 changed files with 2 additions and 0 deletions
|
|
@ -602,6 +602,7 @@ int replace_simple(String *str, char *token, char *rep, int flags, int count, ch
|
||||||
memmove(t,s,(str->str + str->len) - s + 1);
|
memmove(t,s,(str->str + str->len) - s + 1);
|
||||||
}
|
}
|
||||||
str->len += expand;
|
str->len += expand;
|
||||||
|
str->str[str->len] = 0;
|
||||||
if (str->sp >= str->len) str->sp += expand; /* Fix the end of file pointer */
|
if (str->sp >= str->len) str->sp += expand; /* Fix the end of file pointer */
|
||||||
return rcount;
|
return rcount;
|
||||||
}
|
}
|
||||||
|
|
@ -693,6 +694,7 @@ int replace_simple(String *str, char *token, char *rep, int flags, int count, ch
|
||||||
str->str = ns;
|
str->str = ns;
|
||||||
if (str->sp >= str->len) str->sp += expand;
|
if (str->sp >= str->len) str->sp += expand;
|
||||||
str->len += expand;
|
str->len += expand;
|
||||||
|
str->str[str->len] = 0;
|
||||||
str->maxsize = newsize;
|
str->maxsize = newsize;
|
||||||
DohFree(c);
|
DohFree(c);
|
||||||
return rcount;
|
return rcount;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue