From 1bcfcd36f64ea3470a812e2afed1ead947158a57 Mon Sep 17 00:00:00 2001 From: Quietust Date: Tue, 5 Aug 2014 19:59:53 -0500 Subject: [PATCH] Avoid buffer overrun on mouse clicks --- plugins/manipulator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/manipulator.cpp b/plugins/manipulator.cpp index 79a8476d0..36ab7e218 100644 --- a/plugins/manipulator.cpp +++ b/plugins/manipulator.cpp @@ -769,7 +769,7 @@ void viewscreen_unitlaborsst::feed(set *events) if ((gps->mouse_x >= col_offsets[DISP_COLUMN_LABORS]) && (gps->mouse_x < col_offsets[DISP_COLUMN_LABORS] + col_widths[DISP_COLUMN_LABORS])) click_labor = gps->mouse_x - col_offsets[DISP_COLUMN_LABORS] + first_column; - if ((gps->mouse_y >= 4) && (gps->mouse_y <= 4 + num_rows)) + if ((gps->mouse_y >= 4) && (gps->mouse_y < 4 + num_rows)) click_unit = gps->mouse_y - 4 + first_row; switch (click_header)