mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
partially revert 1a5841b for mirb
Fix compilation fail caused by GNU Readline and `ISPRINT`. Also add missing `unsigned char` cast.
This commit is contained in:
@@ -258,7 +258,7 @@ check_keyword(const char *buf, const char *word)
|
||||
size_t len = strlen(word);
|
||||
|
||||
/* skip preceding spaces */
|
||||
while (*p && ISSPACE(*p)) {
|
||||
while (*p && isspace((unsigned char)*p)) {
|
||||
p++;
|
||||
}
|
||||
/* check keyword */
|
||||
@@ -268,7 +268,7 @@ check_keyword(const char *buf, const char *word)
|
||||
p += len;
|
||||
/* skip trailing spaces */
|
||||
while (*p) {
|
||||
if (!ISSPACE(*p)) return 0;
|
||||
if (!isspace((unsigned char)*p)) return 0;
|
||||
p++;
|
||||
}
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user