Skip to content

Commit

Permalink
Negative value shift is problematic. Force unsigned.
Browse files Browse the repository at this point in the history
  • Loading branch information
BsAtHome committed Feb 9, 2025
1 parent a4c80fb commit 3a95ea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hal/utils/scope_disp.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ static int handle_click(GtkWidget *widget, GdkEventButton *event, gpointer data)
} else {
int z = select_trace(event->x, event->y);
int new_channel = z & 0xff;
int channel_part = z >> 8;
int channel_part = (unsigned)z >> 8;

disp->selected_part = channel_part;

Expand Down

0 comments on commit 3a95ea0

Please sign in to comment.