Permalink
Browse files

memory buffer was not always cleared correctly in erase_front

  • Loading branch information...
1 parent 4dffbc8 commit dcf09cf899b91db337c9964c72a13738c9b601c3 @jsteemann jsteemann committed Oct 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/BasicsC/string-buffer.c
View
2 lib/BasicsC/string-buffer.c
@@ -259,7 +259,7 @@ void TRI_EraseFrontStringBuffer (TRI_string_buffer_t * self, size_t len) {
else if (0 < len) {
memmove(self->_buffer, self->_buffer + len, off - len);
self->_current -= len;
- memset(self->_current, 0, self->_len - off);
+ memset(self->_current, 0, self->_len - (self->_current - self->_buffer));
}
}

0 comments on commit dcf09cf

Please sign in to comment.