commit | a6938bab1f6fa76ae98ebbe44f4e534e05fa0993 | [log] [tgz] |
---|---|---|
author | The Android Open Source Project <initial-contribution@android.com> | Tue Feb 10 15:44:00 2009 -0800 |
committer | The Android Open Source Project <initial-contribution@android.com> | Tue Feb 10 15:44:00 2009 -0800 |
tree | bc5a1f806bd06db8abb197e80be9ead3644c0bcc | |
parent | e41dd756db5184519f4dacbf4d95b333822605c7 [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;