Cast char to u_char before passing to isalnum(). By ray

This commit is contained in:
Nicholas Marriott 2009-06-25 15:45:24 +00:00
parent 94f5ddb60c
commit d3d4bacd82

View File

@ -1,4 +1,4 @@
/* $Id: names.c,v 1.5 2009-05-04 17:58:27 nicm Exp $ */ /* $OpenBSD: names.c,v 1.2 2009/06/03 04:03:16 ray Exp $ */
/* /*
* Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
@ -96,7 +96,7 @@ parse_window_name(const char *in)
if (*name != '\0') { if (*name != '\0') {
ptr = name + strlen(name) - 1; ptr = name + strlen(name) - 1;
while (ptr > name && !isalnum(*ptr)) while (ptr > name && !isalnum((u_char)*ptr))
*ptr-- = '\0'; *ptr-- = '\0';
} }