Merge pull request #15108 from poke1024/fix-stringbuffer-append

Fix crash in StringBuffer::append()
This commit is contained in:
Noshyaar 2017-12-28 06:57:20 +07:00 committed by GitHub
commit cfd6bafec6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,7 @@ StringBuffer &StringBuffer::append(const char *p_str) {
reserve(string_length + len + 1);
CharType *buf = current_buffer_ptr();
for (const char *c_ptr = p_str; c_ptr; ++c_ptr) {
for (const char *c_ptr = p_str; *c_ptr; ++c_ptr) {
buf[string_length++] = *c_ptr;
}
return *this;