comparison lwasm/main.c @ 411:9f796134d6f4

Fix wrong sense in strcasecmp() If you want to compare if something matches, you have to compare the strcasecmp() return with *zero*.
author William Astle <lost@l-w.ca>
date Mon, 21 Mar 2016 09:02:23 -0600
parents 4411a6123716
children b4825b42c151
comparison
equal deleted inserted replaced
410:7f538053492c 411:9f796134d6f4
173 break; 173 break;
174 174
175 case 'f': 175 case 'f':
176 if (!strcasecmp(arg, "decb")) 176 if (!strcasecmp(arg, "decb"))
177 as -> output_format = OUTPUT_DECB; 177 as -> output_format = OUTPUT_DECB;
178 else if (strcasecmp(arg, "basic")) 178 else if (!strcasecmp(arg, "basic"))
179 as -> output_format = OUTPUT_BASIC; 179 as -> output_format = OUTPUT_BASIC;
180 else if (!strcasecmp(arg, "raw")) 180 else if (!strcasecmp(arg, "raw"))
181 as -> output_format = OUTPUT_RAW; 181 as -> output_format = OUTPUT_RAW;
182 else if (!strcasecmp(arg, "rawrel")) 182 else if (!strcasecmp(arg, "rawrel"))
183 as -> output_format = OUTPUT_RAWREL; 183 as -> output_format = OUTPUT_RAWREL;