Fix unportable usage of <ctype.h> functions.
isdigit(), isspace(), etc are likely to give surprising results if passed a signed char. We should always cast the argument to unsigned char to avoid that. Error in commit d78a7d9c7fa3e9cd, found by buildfarm member gaur.
This commit is contained in:
parent
2b46259b46
commit
cb0ca0c995
@ -363,7 +363,7 @@ DecodeFlag(IspellDict *Conf, char *sflag, char **sflagnext)
|
|||||||
errmsg("non-ASCII affix flag \"%s\"",
|
errmsg("non-ASCII affix flag \"%s\"",
|
||||||
sflag)));
|
sflag)));
|
||||||
}
|
}
|
||||||
else if (isdigit(*next))
|
else if (isdigit((unsigned char) *next))
|
||||||
{
|
{
|
||||||
if (!met_comma)
|
if (!met_comma)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
@ -381,7 +381,7 @@ DecodeFlag(IspellDict *Conf, char *sflag, char **sflagnext)
|
|||||||
sflag)));
|
sflag)));
|
||||||
met_comma = true;
|
met_comma = true;
|
||||||
}
|
}
|
||||||
else if (!isspace(*next))
|
else if (!isspace((unsigned char) *next))
|
||||||
{
|
{
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_CONFIG_FILE_ERROR),
|
(errcode(ERRCODE_CONFIG_FILE_ERROR),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user