summaryrefslogtreecommitdiff
path: root/libs/utils/String8.cpp
diff options
context:
space:
mode:
author Jean-Baptiste Queru <jbq@google.com> 2009-03-18 11:33:14 -0700
committer Jean-Baptiste Queru <jbq@google.com> 2009-03-18 11:33:14 -0700
commit2a73de7b21a89aa2ba4c254d28658b49793425b2 (patch)
treeded5bcd581464b4174d81c373044b6d36eee58d2 /libs/utils/String8.cpp
parent42e48026b21a962e5bf40344d738665ecbd9d74d (diff)
parentba87e3e6c985e7175152993b5efcc7dd2f0e1c93 (diff)
Merge commit 'remotes/korg/cupcake' into merge
Conflicts: core/java/android/view/animation/TranslateAnimation.java core/jni/Android.mk core/res/res/values-en-rGB/strings.xml libs/audioflinger/AudioFlinger.cpp libs/surfaceflinger/LayerScreenshot.cpp packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Diffstat (limited to 'libs/utils/String8.cpp')
-rw-r--r--libs/utils/String8.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/utils/String8.cpp b/libs/utils/String8.cpp
index ab843f6e798b..c50d343a731b 100644
--- a/libs/utils/String8.cpp
+++ b/libs/utils/String8.cpp
@@ -317,8 +317,10 @@ status_t String8::real_append(const char* other, size_t otherLen)
->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;