Changeset 553 for trunk


Ignore:
Timestamp:
Nov 29, 2013 4:08:19 AM (5 years ago)
Author:
bjarni
Message:

Fixed wrong string comparison in coinLocateOptionName() in trunk 1.7 (suggestion from Miles Lubin)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CoinMP/src/CoinOption.c

    r385 r553  
    126126
    127127        for (i = 0; i < pOption->OptionCount; i++) {
    128                 if (STRING_COMPARE_NOCASE(OptionName, pOption->OptionTable[i].OptionName) != 0) {
     128                if (STRING_COMPARE_NOCASE(OptionName, pOption->OptionTable[i].OptionName) == 0) { // BK 11/28/2013: Was !=, thanks to Miles Lubin for pointing this out
    129129                        return pOption->OptionTable[i].OptionID;
    130130                }
    131                 if (STRING_COMPARE_NOCASE(OptionName, pOption->OptionTable[i].ShortName) != 0) {
     131                if (STRING_COMPARE_NOCASE(OptionName, pOption->OptionTable[i].ShortName) == 0) {
    132132                        return pOption->OptionTable[i].OptionID;
    133133                }
Note: See TracChangeset for help on using the changeset viewer.