Mercurial > hg > index.cgi
changeset 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 | 7f538053492c |
children | f8e56377a32a |
files | lwasm/main.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
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;