diff --git a/src/www_email.c b/src/www_email.c index 5de77ce..e1c1b5a 100644 --- a/src/www_email.c +++ b/src/www_email.c @@ -91,7 +91,7 @@ int www_send_email(struct user_record *user, char *recipient, char *subject, cha uname(&name); for (char *p = ibody; *p != '\0'; ++p) { - if (*p == 0xc2 && *(p+1) == 0xa0) { + if ((*p & 0xff) == 0xc2 && (*(p + 1) & 0xff) == 0xa0) { stralloc_append1(&sa, ' '); p++; } else if (*p != '\n') { diff --git a/src/www_msgs.c b/src/www_msgs.c index a2f769c..7f145cd 100644 --- a/src/www_msgs.c +++ b/src/www_msgs.c @@ -1119,7 +1119,7 @@ int www_send_msg(struct user_record *user, char *to, char *subj, int conference, // remove nbsp while (*p != '\0') { - if (*p == 0xc2 && *(p + 1) == 0xa0) { + if ((*p & 0xff) == 0xc2 && (*(p + 1) & 0xff) == 0xa0) { stralloc_append1(&unhtmlized, ' '); p++; } else {