Skip to content

Commit

Permalink
fix: Make sure that the OIInfo comparator maintains strict weak ordering
Browse files Browse the repository at this point in the history
That's the other reason why std::sort() would sort it differently
depending on the system.
  • Loading branch information
dwatteau committed Feb 6, 2022
1 parent 474e331 commit 8322e6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ScummRp/block.hpp
Expand Up @@ -742,7 +742,7 @@ class OldRoom : public RoomBlock
uint16 offset;
uint16 size;

bool operator<(const OIInfo &right) const { return offset < right.offset; }
bool operator<(const OIInfo &right) const { return offset < right.offset && num < right.num; }
OIInfo(int n, uint16 o, uint16 s) : num(n), offset(o), size(s) { }
};

Expand Down

0 comments on commit 8322e6d

Please sign in to comment.