diff options
author | Helge Deller <deller@gmx.de> | 2013-07-02 22:35:33 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2013-07-02 22:35:33 +0200 |
commit | 223eaf83687399dd436306251118f3630928c6ef (patch) | |
tree | 4755d43b820f8b3e95a48a63c8f1daef1ad8a2ef | |
parent | 2ff3224e763b3e5c178e1ec9bb23a0fef234cd04 (diff) | |
download | palo-223eaf83687399dd436306251118f3630928c6ef.tar.gz |
The IPL boot loader sometimes drops a '\n' at the beginning of strings.
Try to fix this by more correctly implement strchr().
-rw-r--r-- | ipl/lib.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -304,9 +304,11 @@ char * strncpy(char * dest,const char *src,size_t count) */ char * strchr(const char * s, int c) { - for(; *s != (char) c; ++s) + while (*s != (char)c) { if (*s == '\0') return NULL; + ++s; + } return (char *) s; } /* $Id: lib.c,v 1.3 2000/07/12 21:20:50 bame Exp $ */ |