Skip to content

Commit

Permalink
Fix size of the array passed to memset() (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
f2404 authored and agaida committed Oct 3, 2016
1 parent 2cca598 commit 1727d92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/History.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ void HistoryScrollBlockArray::addCells(const Character a[], int count)
// put cells in block's data
Q_ASSERT((count * sizeof(Character)) < ENTRIES);

memset(b->data, 0, ENTRIES);
memset(b->data, 0, sizeof(b->data));

memcpy(b->data, a, count * sizeof(Character));
b->size = count * sizeof(Character);
Expand Down

0 comments on commit 1727d92

Please sign in to comment.