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

Commit 28194d83 authored by Chia-I Wu's avatar Chia-I Wu
Browse files

surfaceflinger: fix z type in LayerVector::do_compare

The issue was exposed by commit 80de6f35 (Fix surfaceflinger on
integer sanitized builds).

Test: SurfaceFlinger_test
Change-Id: Ie77b2f48f2108030a308360c07cf0260f33c48ca
parent 63f1be59
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -37,8 +37,8 @@ int LayerVector::do_compare(const void* lhs, const void* rhs) const
    if (ls != rs)
        return (ls > rs) ? 1 : -1;

    uint32_t lz = l->getCurrentState().z;
    uint32_t rz = r->getCurrentState().z;
    int32_t lz = l->getCurrentState().z;
    int32_t rz = r->getCurrentState().z;
    if (lz != rz)
        return (lz > rz) ? 1 : -1;