commit | 60dcc00861a1810deea7b31968578010556d4f3a | [log] [tgz] |
---|---|---|
author | The Android Open Source Project <initial-contribution@android.com> | Tue Feb 10 15:44:00 2009 -0800 |
committer | Alex Ray <aray@google.com> | Tue Jul 30 13:56:49 2013 -0700 |
tree | 2d5fd61c02fc1eec709437d979483869ad9d9f34 | |
parent | 13e4bed7dbfc5d785f774539021cf428ca851601 [diff] [blame] |
auto import from //branches/cupcake/...@130745
diff --git a/libs/utils/String8.cpp b/libs/utils/String8.cpp index ab843f6..c50d343 100644 --- a/libs/utils/String8.cpp +++ b/libs/utils/String8.cpp
@@ -317,8 +317,10 @@ ->editResize(myLen+otherLen+1); if (buf) { char* str = (char*)buf->data(); - memcpy(str+myLen, other, otherLen+1); mString = str; + str += myLen; + memcpy(str, other, otherLen); + str[otherLen] = '\0'; return NO_ERROR; } return NO_MEMORY;