Fix opp string append char

This commit is contained in:
drmortalwombat 2023-08-28 18:52:14 +02:00
parent 7bf5ce7581
commit fa19e466de

View File

@ -211,7 +211,7 @@ string & string::operator+=(char c)
p[l] = c;
p[l + 1] = 0;
free(cstr);
cstr = c;
cstr = p;
}
else
{
@ -220,6 +220,7 @@ string & string::operator+=(char c)
cstr[1] = c;
cstr[2] = 0;
}
return *this;
}