Skip to content
This repository
Browse code

memory buffer was not always cleared correctly in erase_front

  • Loading branch information...
commit dcf09cf899b91db337c9964c72a13738c9b601c3 1 parent 4dffbc8
Jan authored October 11, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  lib/BasicsC/string-buffer.c
2  lib/BasicsC/string-buffer.c
@@ -259,7 +259,7 @@ void TRI_EraseFrontStringBuffer (TRI_string_buffer_t * self, size_t len) {
259 259
   else if (0 < len) {
260 260
     memmove(self->_buffer, self->_buffer + len, off - len);
261 261
     self->_current -= len;
262  
-    memset(self->_current, 0, self->_len - off); 
  262
+    memset(self->_current, 0, self->_len - (self->_current - self->_buffer));
263 263
   }
264 264
 }
265 265
 

0 notes on commit dcf09cf

Please sign in to comment.
Something went wrong with that request. Please try again.