Skip to content

Commit

Permalink
SudokuView: Check array index before the data array in _FilterString
Browse files Browse the repository at this point in the history
  • Loading branch information
lioncash authored and mmuman committed Sep 26, 2014
1 parent 040e39c commit 907046d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/apps/sudoku/SudokuView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ SudokuView::_FilterString(const char* data, size_t dataLength, char* buffer,
{
uint32 maxOut = fField->Size() * fField->Size();

for (uint32 i = 0; data[i] && i < dataLength; i++) {
for (uint32 i = 0; i < dataLength && data[i]; i++) {
if (data[i] == '#')
ignore = true;
else if (data[i] == '\n')
Expand Down

0 comments on commit 907046d

Please sign in to comment.