Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcb0ca0c

Browse files
committed
Fix unportable usage of <ctype.h> functions.
isdigit(), isspace(), etc are likely to give surprising results if passed asigned char. We should always cast the argument to unsigned char to avoidthat. Error in commitd78a7d9, found by buildfarm member gaur.
1 parent2b46259 commitcb0ca0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/tsearch/spell.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ DecodeFlag(IspellDict *Conf, char *sflag, char **sflagnext)
363363
errmsg("non-ASCII affix flag \"%s\"",
364364
sflag)));
365365
}
366-
elseif (isdigit(*next))
366+
elseif (isdigit((unsignedchar)*next))
367367
{
368368
if (!met_comma)
369369
ereport(ERROR,
@@ -381,7 +381,7 @@ DecodeFlag(IspellDict *Conf, char *sflag, char **sflagnext)
381381
sflag)));
382382
met_comma= true;
383383
}
384-
elseif (!isspace(*next))
384+
elseif (!isspace((unsignedchar)*next))
385385
{
386386
ereport(ERROR,
387387
(errcode(ERRCODE_CONFIG_FILE_ERROR),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp