Skip to content

Commit

Permalink
layersurface: dont rollover on size_t (#7451)
Browse files Browse the repository at this point in the history
unneded rollover on size_t if force equals -1
  • Loading branch information
gulafaran authored Aug 21, 2024
1 parent 8162fae commit cae937c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/desktop/LayerSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ void CLayerSurface::startAnimation(bool in, bool instant) {
PMONITOR->vecPosition + Vector2D{PMONITOR->vecSize.x, PMONITOR->vecSize.y / 2},
};

float closest = std::numeric_limits<float>::max();
size_t leader = force;
float closest = std::numeric_limits<float>::max();
int leader = force;
if (leader == -1) {
for (size_t i = 0; i < 4; ++i) {
float dist = MIDDLE.distance(edgePoints[i]);
Expand Down

0 comments on commit cae937c

Please sign in to comment.