diff options
Diffstat (limited to 'linux/Battery.c')
-rw-r--r-- | linux/Battery.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/Battery.c b/linux/Battery.c index 761b8ad7..34a24011 100644 --- a/linux/Battery.c +++ b/linux/Battery.c @@ -72,6 +72,8 @@ static unsigned long int parseBatInfo(const char *fileName, const unsigned short fclose(file); + if (!line) break; + char *foundNumStr = String_getToken(line, wordNum); const unsigned long int foundNum = atoi(foundNumStr); free(foundNumStr); |