bc: do not needlessly use strcat
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
23c2e9fcf9
commit
4c30406df6
@ -1148,7 +1148,7 @@ static void bc_vec_concat(BcVec *v, const char *str)
|
|||||||
len = v->len + strlen(str);
|
len = v->len + strlen(str);
|
||||||
|
|
||||||
if (v->cap < len) bc_vec_grow(v, len - v->len);
|
if (v->cap < len) bc_vec_grow(v, len - v->len);
|
||||||
strcat(v->v, str);
|
strcpy(v->v + v->len, str);
|
||||||
|
|
||||||
v->len = len;
|
v->len = len;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user