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

Commit be5016ba authored by Jesper Tragardh's avatar Jesper Tragardh Committed by Henrik Baard
Browse files

Correct ID3::StringSize calculation for UCS-2 data.

Album art was not displayed when albums were transferred via MediaGo
because the length of the description in the APIC tag was not
correctly calculated.

The method StringSize used to calculate the length of the tag
does not add the size of the null termination in UCS-2 case.

Change-Id: I5409d42f5e87d315e6e03c4d7e6cbd8a378a160d
parent ffb82943
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -743,7 +743,8 @@ static size_t StringSize(const uint8_t *start, uint8_t encoding) {
        n += 2;
    }

    return n;
    // Add size of null termination.
    return n + 2;
}

const void *