[FFmpeg-cvslog] r9585 - trunk/libavutil/string.c

mru subversion
Tue Jul 10 23:43:35 CEST 2007


Author: mru
Date: Tue Jul 10 23:43:35 2007
New Revision: 9585

Log:
10l: fix av_str[i]start()


Modified:
   trunk/libavutil/string.c

Modified: trunk/libavutil/string.c
==============================================================================
--- trunk/libavutil/string.c	(original)
+++ trunk/libavutil/string.c	Tue Jul 10 23:43:35 2007
@@ -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 c
 
 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;




More information about the ffmpeg-cvslog mailing list