提交 af10378a 编写于 作者: H Hiroshi Inoue

Fix a bug in multibyte_strchr().

上级 867901db
......@@ -253,18 +253,18 @@ unsigned char *
pg_mbschr(int csc, const unsigned char *string, unsigned int character)
{
int mb_st = 0;
unsigned char *s;
s = (unsigned char *) string;
const unsigned char *s, *rs = NULL;
for(;;)
for(s = string; *s ; s++)
{
mb_st = pg_CS_stat(mb_st, (unsigned char) *s, csc);
if (mb_st == 0 && (*s == character || *s == 0))
if (mb_st == 0 && (*s == character))
{
rs = s;
break;
else
s++;
}
}
return (s);
return (rs);
}
int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册