From 22f87f67ab24d42fe0872cb5ceea6ecafe8933ad Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sat, 12 May 2018 19:43:02 +0800 Subject: [PATCH] char names should obey case-(in)sensitivity (issue #471) --- sexp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sexp.c b/sexp.c index 39475a27..f680bfca 100644 --- a/sexp.c +++ b/sexp.c @@ -3120,7 +3120,7 @@ sexp sexp_read_raw (sexp ctx, sexp in, sexp *shares) { } else { res = 0; for (c2=0; c2 < sexp_num_char_names; c2++) { - if (strcasecmp(str, sexp_char_names[c2].name) == 0) { + if ((sexp_port_fold_casep(in) ? strcasecmp : strcmp)(str, sexp_char_names[c2].name) == 0) { res = sexp_make_character(sexp_char_names[c2].ch); break; }