diff --git a/renderdoc/api/replay/rdcpair.h b/renderdoc/api/replay/rdcpair.h
index 8e0f9b9c7..9b96977f6 100644
--- a/renderdoc/api/replay/rdcpair.h
+++ b/renderdoc/api/replay/rdcpair.h
@@ -86,7 +86,7 @@ struct rdcpair
bool operator==(const rdcpair &o) const { return first == o.first && second == o.second; }
bool operator<(const rdcpair &o) const
{
- if(first != o.first)
+ if(!(first == o.first))
return first < o.first;
return second < o.second;
}