# HG changeset patch # User mru # Date 1184103815 0 # Node ID 92b31fec32b0721991f529ff2f0d7889aa4e9aa3 # Parent b951d460bcb4978a3eafd958423ae42e74afc6bd 10l: fix av_str[i]start() diff -r b951d460bcb4 -r 92b31fec32b0 string.c --- 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;