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

Commit 06a13896 authored by Jay Patel's avatar Jay Patel Committed by Dan Stoza
Browse files

Fix HdrCapabilities flattening

Modify vector reserve() to resize() to allocate and initialize the
updated vector

Bug: 64309771
Test: n/a
Change-Id: I76fd088493327b00cca39ef67e2362e4c79314be
parent e89483f1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ status_t HdrCapabilities::unflatten(void const* buffer, size_t size) {
    mMaxAverageLuminance = reinterpret_cast<float const&>(buf[1]);
    mMinLuminance        = reinterpret_cast<float const&>(buf[2]);
    if (itemCount) {
        mSupportedHdrTypes.reserve(itemCount);
        mSupportedHdrTypes.resize(itemCount);
        for (size_t i = 0; i < itemCount; ++i) {
            mSupportedHdrTypes[i] = buf[4 + i];
        }