OSDN Git Service
(root)
/
pg-rex
/
syncrep.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
867901d
)
Fix a bug in multibyte_strchr().
author
Hiroshi Inoue
<inoue@tpf.co.jp>
Thu, 4 Apr 2002 01:36:17 +0000
(
01:36
+0000)
committer
Hiroshi Inoue
<inoue@tpf.co.jp>
Thu, 4 Apr 2002 01:36:17 +0000
(
01:36
+0000)
src/interfaces/odbc/multibyte.c
patch
|
blob
|
history
diff --git
a/src/interfaces/odbc/multibyte.c
b/src/interfaces/odbc/multibyte.c
index
3cc3efe
..
476f3c4
100644
(file)
--- a/
src/interfaces/odbc/multibyte.c
+++ b/
src/interfaces/odbc/multibyte.c
@@
-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 (
r
s);
}
int