summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-08 05:59:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-09-08 05:59:43 +0000
commit7b4486c87774f6318b7bd1cabae5480136357c31 (patch)
tree04282446c3de315144bb4567bacf21dd7267e211 /missing
parentac0a38e8cf14a9845a175dafce1e047f593e0450 (diff)
* merged a patch from Takahiro Kambe <taca@back-street.net> to
support DragonFly BSD. [ruby-dev:26984] * object.c (rb_mod_cvar_get, rb_mod_cvar_set): document fix from sheepman <sheepman@sheepman.sakura.ne.jp>; a bug in visibility description. [ruby-dev:26965] * sprintf.c (rb_f_sprintf): warn "too many argument" on verbose mode (-v/-w); backported from 1.9. [ruby-dev:26963] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@9102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r--missing/strchr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/missing/strchr.c b/missing/strchr.c
index 82f3cc9..886d70e 100644
--- a/missing/strchr.c
+++ b/missing/strchr.c
@@ -19,8 +19,10 @@ strrchr(s, c)
char *s;
int c;
{
- char *save = 0;
+ char *save;
+ if (c == 0) return s + strlen(s);
+ save = 0;
while (*s) {
if (*s == c)
save = s;