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

Commit 83f8e4d9 authored by Robert Carr's avatar Robert Carr
Browse files

Fix signedness issue in LayerProtoParser

Makes things appear out of order in the dump.

Test: Manual use of dumpsys.
Change-Id: I48b29281cddf2f66a88e21e162858205fbace25d
parent 81be9993
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -29,9 +29,11 @@ bool sortLayers(const LayerProtoParser::Layer* lhs, const LayerProtoParser::Laye
    uint32_t rs = rhs->layerStack;
    if (ls != rs) return ls < rs;

    uint32_t lz = lhs->z;
    uint32_t rz = rhs->z;
    if (lz != rz) return lz < rz;
    int32_t lz = lhs->z;
    int32_t rz = rhs->z;
    if (lz != rz) {
        return (lz > rz) ? 1 : -1;
    }

    return lhs->id < rhs->id;
}