diff options
author | Måns Rullgård <mans@mansr.com> | 2007-07-10 21:43:35 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2007-07-10 21:43:35 +0000 |
commit | 059eeabf35f866415d91ff2b5829d8ab2e7f43f9 (patch) | |
tree | 41e08a6725a7c3ecc05874d88ea28bb7a5c96ee6 /libavutil/string.c | |
parent | 1e56c151bcd81244f52bffd0fa16939c164da506 (diff) | |
download | ffmpeg-059eeabf35f866415d91ff2b5829d8ab2e7f43f9.tar.gz |
10l: fix av_str[i]start()
Originally committed as revision 9585 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/string.c')
-rw-r--r-- | libavutil/string.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libavutil/string.c b/libavutil/string.c index 20f89c7036..2f4de8ef50 100644 --- a/libavutil/string.c +++ b/libavutil/string.c @@ -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_strstart(const char *str, const char *pfx, const char **ptr) 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; |