Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3d865240 authored by Per Andersson's avatar Per Andersson Committed by Johan Redestig
Browse files

Adding a sanity test in the while loop in readHistory()

Adding a sanity test in the while loop in readHistory() which
is useful in case the file read (batterystats.bin), is corrupt.
The file can get corrupt (missing end of file marker -1) if
writeHistory fails for some reason. Without this change
readHistory will continue looping untill an OutOfMemory is
thrown.

Change-Id: I3418d258e7cb99aa2f9d934c9449a19806499ce4
parent 7118bdec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment