[xiph-commits] r12837 - trunk/theora-exp/lib

j at svn.xiph.org j at svn.xiph.org
Mon Apr 9 09:55:49 PDT 2007


Author: j
Date: 2007-04-09 09:55:47 -0700 (Mon, 09 Apr 2007)
New Revision: 12837

Modified:
   trunk/theora-exp/lib/info.c
Log:
- fix comments query, tag_len was off by one



Modified: trunk/theora-exp/lib/info.c
===================================================================
--- trunk/theora-exp/lib/info.c	2007-04-09 16:19:03 UTC (rev 12836)
+++ trunk/theora-exp/lib/info.c	2007-04-09 16:55:47 UTC (rev 12837)
@@ -70,13 +70,12 @@
   long i;
   int  found;
   int  tag_len;
-  /*+1 for the '=' we append.*/
-  tag_len=strlen(_tag)+1;
+  tag_len=strlen(_tag);
   found=0;
   for(i=0;i<_tc->comments;i++){
     if(!oc_tagcompare(_tc->user_comments[i],_tag,tag_len)){
       /*We return a pointer to the data, not a copy.*/
-      if(_count==found++)return _tc->user_comments[i]+tag_len;
+      if(_count==found++)return _tc->user_comments[i]+tag_len+1;
     }
   }
   /*Didn't find anything.*/
@@ -87,8 +86,7 @@
   long i;
   int  tag_len;
   int  count;
-  /*+1 for the '=' we append.*/
-  tag_len=strlen(_tag)+1;
+  tag_len=strlen(_tag);
   count=0;
   for(i=0;i<_tc->comments;i++){
     if(!oc_tagcompare(_tc->user_comments[i],_tag,tag_len))count++;



More information about the commits mailing list