summaryrefslogtreecommitdiff
path: root/lib/loader.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/loader.py')
-rw-r--r--lib/loader.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/loader.py b/lib/loader.py
index b5cfa97..2f45a99 100644
--- a/lib/loader.py
+++ b/lib/loader.py
@@ -1268,7 +1268,8 @@ def _load_energytrace(data_string):
hardware_state_changes = list()
if hardware_states[0]:
prev_state = hardware_states[0]
- for i, state in enumerate(hardware_states):
+ # timestamps start at data[1], so hardware state change indexes must start at 1, too
+ for i, state in enumerate(hardware_states[1:]):
if (
state != prev_state
and state != "0000000000000000"