Skip to content

Commit

Permalink
fixed out of range timestamp bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sorousherafat committed May 3, 2023
1 parent 12564f6 commit 9c8e780
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions libvcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,8 @@ char *get_signal_value(signal_t *signal, timestamp_t timestamp) {
for (int i = 0; i < signal->changes_count; ++i) {
value_change_t *value_change = &signal->value_changes[i];
if (timestamp < value_change->timestamp)
return previous_value;
break;
previous_value = value_change->value;
}

return NULL;
return previous_value;
}

0 comments on commit 9c8e780

Please sign in to comment.