Fix opp string append char
This commit is contained in:
parent
7bf5ce7581
commit
fa19e466de
|
@ -211,7 +211,7 @@ string & string::operator+=(char c)
|
||||||
p[l] = c;
|
p[l] = c;
|
||||||
p[l + 1] = 0;
|
p[l + 1] = 0;
|
||||||
free(cstr);
|
free(cstr);
|
||||||
cstr = c;
|
cstr = p;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -220,6 +220,7 @@ string & string::operator+=(char c)
|
||||||
cstr[1] = c;
|
cstr[1] = c;
|
||||||
cstr[2] = 0;
|
cstr[2] = 0;
|
||||||
}
|
}
|
||||||
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue