Skip to content
Snippets Groups Projects
Commit 059eeabf authored by Måns Rullgård's avatar Måns Rullgård
Browse files

10l: fix av_str[i]start()

Originally committed as revision 9585 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 1e56c151
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,10 @@ ...@@ -25,7 +25,10 @@
int av_strstart(const char *str, const char *pfx, const char **ptr) 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) if (!*pfx && ptr)
*ptr = str; *ptr = str;
return !*pfx; return !*pfx;
...@@ -33,7 +36,10 @@ int av_strstart(const char *str, const char *pfx, const char **ptr) ...@@ -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) 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) if (!*pfx && ptr)
*ptr = str; *ptr = str;
return !*pfx; return !*pfx;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment