ui/update_line_data: fix assert when max_idx = TRAJECTORY_SIZE-1 (#21543)

old-commit-hash: f554dc0ae624527234931946305a7d010e1230b0
This commit is contained in:
Dean Lee
2021-07-13 21:37:19 +08:00
committed by GitHub
parent 6e5af4de8a
commit c351c71641
+1 -1
View File
@@ -85,7 +85,7 @@ static void update_line_data(const UIState *s, const cereal::ModelDataV2::XYZTDa
v += calib_frame_to_full_frame(s, line_x[i], line_y[i] + y_off, line_z[i] + z_off, v);
}
pvd->cnt = v - pvd->v;
assert(pvd->cnt < std::size(pvd->v));
assert(pvd->cnt <= std::size(pvd->v));
}
static void update_model(UIState *s, const cereal::ModelDataV2::Reader &model) {