Mercurial > hg > octave-nkf
changeset 20498:494a5ed628b5
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.
author | Rik <rik@octave.org> |
---|---|
date | Fri, 26 Jun 2015 08:37:45 -0700 |
parents | cdb382f1de79 |
children | 13ede127ec9a |
files | libinterp/corefcn/graphics.cc |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc +++ b/libinterp/corefcn/graphics.cc @@ -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--; }