mirror of https://gitlab.com/rnger/amath
Fixed read of wrong address
This commit is contained in:
parent
88664a91de
commit
8bec52a8ee
|
@ -217,6 +217,10 @@ void CharBuffer::Append(const char* source)
|
||||||
|
|
||||||
bool CharBuffer::RemoveTrailing(const char c)
|
bool CharBuffer::RemoveTrailing(const char c)
|
||||||
{
|
{
|
||||||
|
if (ptr == buf) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (*(ptr - 1) == c) {
|
if (*(ptr - 1) == c) {
|
||||||
ptr--;
|
ptr--;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue