Mercurial > libavutil.hg
changeset 360:92b31fec32b0 libavutil
10l: fix av_str[i]start()
author | mru |
---|---|
date | Tue, 10 Jul 2007 21:43:35 +0000 |
parents | b951d460bcb4 |
children | 6661c25d55aa |
files | string.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/string.c Sun Jul 08 15:56:31 2007 +0000 +++ b/string.c Tue Jul 10 21:43:35 2007 +0000 @@ -25,7 +25,10 @@ int av_strstart(const char *str, const char *pfx, const char **ptr) { - while (*pfx && *pfx++ == *str++); + while (*pfx && *pfx == *str) { + pfx++; + str++; + } if (!*pfx && ptr) *ptr = str; return !*pfx; @@ -33,7 +36,10 @@ int av_stristart(const char *str, const char *pfx, const char **ptr) { - while (*pfx && toupper((unsigned)*pfx++) == toupper((unsigned)*str++)); + while (*pfx && toupper((unsigned)*pfx) == toupper((unsigned)*str)) { + pfx++; + str++; + } if (!*pfx && ptr) *ptr = str; return !*pfx;