Mercurial > hg > index.cgi
diff 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 |
line wrap: on
line diff
--- a/lwasm/main.c Thu Mar 03 22:59:36 2016 -0700 +++ b/lwasm/main.c Mon Mar 21 09:02:23 2016 -0600 @@ -175,7 +175,7 @@ case 'f': if (!strcasecmp(arg, "decb")) as -> output_format = OUTPUT_DECB; - else if (strcasecmp(arg, "basic")) + else if (!strcasecmp(arg, "basic")) as -> output_format = OUTPUT_BASIC; else if (!strcasecmp(arg, "raw")) as -> output_format = OUTPUT_RAW;