Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ee57e39 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am 6637e307: am bfb5f596: Merge "Fix for writing empty strings to Parcel::writeString8()"

* commit '6637e307494475b85afe8869d312d4a2f832d8f4':
  Fix for writing empty strings to Parcel::writeString8()
parents d93f3686 587567a9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -619,7 +619,10 @@ status_t Parcel::writeCString(const char* str)
status_t Parcel::writeString8(const String8& str)
{
    status_t err = writeInt32(str.bytes());
    if (err == NO_ERROR) {
    // only write string if its length is more than zero characters,
    // as readString8 will only read if the length field is non-zero.
    // this is slightly different from how writeString16 works.
    if (str.bytes() > 0 && err == NO_ERROR) {
        err = write(str.string(), str.bytes()+1);
    }
    return err;