a new testcase with the corresponding bug fix.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Thu, 19 Apr 2007 22:29:09 +0200
changeset 436 e3223ddba0fb
parent 435 dd85b014c690
child 437 b2169abd3451
child 439 fed13fb45eef
child 443 488fa6235c5f
a new testcase with the corresponding bug fix.
src/common/buffer.cc
--- a/src/common/buffer.cc	Thu Apr 19 11:00:18 2007 +0200
+++ b/src/common/buffer.cc	Thu Apr 19 22:29:09 2007 +0200
@@ -140,7 +140,7 @@
       /* enough space but need to move data around to fit new data */
       memmove (m_data->m_data + start, GetStart (), m_size);
       NS_ASSERT (start > m_start);
-      m_data->m_initialStart += start;
+      m_data->m_initialStart += start - m_start;
       m_start = 0;
       m_size += start;
     } 
@@ -647,9 +647,13 @@
     {
       ok = false;
     }
-  
-  
-  
+
+  buffer = Buffer (6);
+  buffer.AddAtStart (9);
+  buffer.AddAtEnd (3);
+  i = buffer.End ();
+  i.Prev (1);
+  i.WriteU8 (1, 1);
 
   return ok;
 }