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

Commitaf10378

Browse files
author
Hiroshi Inoue
committed
Fix a bug in multibyte_strchr().
1 parent867901d commitaf10378

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎src/interfaces/odbc/multibyte.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -253,18 +253,18 @@ unsigned char *
253253
pg_mbschr(intcsc,constunsignedchar*string,unsignedintcharacter)
254254
{
255255
intmb_st=0;
256-
unsignedchar*s;
257-
s= (unsignedchar*)string;
256+
constunsignedchar*s,*rs=NULL;
258257

259-
for(;;)
258+
for(s=string;*s ;s++)
260259
{
261260
mb_st=pg_CS_stat(mb_st, (unsignedchar)*s,csc);
262-
if (mb_st==0&& (*s==character||*s==0))
261+
if (mb_st==0&& (*s==character))
262+
{
263+
rs=s;
263264
break;
264-
else
265-
s++;
265+
}
266266
}
267-
return (s);
267+
return (rs);
268268
}
269269

270270
int

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp