Skip to content

Commit

Permalink
Check for non zero count value
Browse files Browse the repository at this point in the history
  • Loading branch information
sambley authored and mvines committed Jun 19, 2019
1 parent 46bb79d commit 2562e48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion runtime/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ impl AccountStorageEntry {
status = AccountStorageStatus::Available;
}

*count_and_status = (count - 1, status);
if count > 0 {
*count_and_status = (count - 1, status);
}
count_and_status.0
}
}
Expand Down

0 comments on commit 2562e48

Please sign in to comment.