Bugfix (assignment used over comparison)

This commit is contained in:
Imbus 2024-11-27 17:14:10 +01:00
parent 686fd07e08
commit c5e034c3ac

View file

@ -56,8 +56,8 @@ User UserTable::find(int c) const
while (low < high && ! found) {
mid = (low + high) / 2;
//
int midnbr = users[mid].getCardNbr();
if (midnbr = c) {
const int midnbr = users[mid].getCardNbr();
if (c == midnbr) {
found = true;
} else if (users[mid].getCardNbr() < c) {
low = mid + 1;