# HG changeset patch # User Rik # Date 1435333065 25200 # Node ID 494a5ed628b5baad2fbac27a5084d2444d77d3d1 # Parent cdb382f1de79f096e795493cab41b9fb6a59197b Fix segfault when zooming in on logscale axes (bug #45412). * graphics.cc (axes::properties::calc_ticks_and_lims): When adjusting ticks to to fit within existing manual limits, make sure that upper tick remains greater than or equal to lower tick. diff -r cdb382f1de79 -r 494a5ed628b5 libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Thu Jun 25 21:47:06 2015 -0700 +++ b/libinterp/corefcn/graphics.cc Fri Jun 26 08:37:45 2015 -0700 @@ -7114,7 +7114,7 @@ if (limmode_is_auto) { - // Adjust limits to include min and max tics + // Adjust limits to include min and max ticks Matrix tmp_lims (1,2); tmp_lims(0) = std::min (tick_sep * i1, lo); tmp_lims(1) = std::max (tick_sep * i2, hi); @@ -7136,10 +7136,10 @@ } else { - // adjust min and max tics to be within limits + // adjust min and max ticks to be within limits if (i1*tick_sep < lo) i1++; - if (i2*tick_sep > hi) + if (i2*tick_sep > hi && i2 > i1) i2--; }