changeset 17732:dcc88366f94b

Print warning and abort FLTK plot if data values < -maxfloat (bug #40246) * libinterp/corefcn/gl-render.cc: Check that x,y,z min values are not smaller than -maxfloat.
author Rik <rik@octave.org>
date Tue, 22 Oct 2013 16:20:33 -0700
parents f79bf671a493
children 8ad59bef27b5
files libinterp/corefcn/gl-render.cc
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/gl-render.cc	Tue Oct 22 18:43:36 2013 -0400
+++ b/libinterp/corefcn/gl-render.cc	Tue Oct 22 16:20:33 2013 -0700
@@ -1401,7 +1401,8 @@
   double z_min = props.get_z_min ();
   double z_max = props.get_z_max ();
 
-  if (x_max > floatmax || y_max > floatmax || z_max > floatmax)
+  if (x_max > floatmax || y_max > floatmax || z_max > floatmax
+      || x_min < -floatmax || y_min < -floatmax || z_min < -floatmax)
   {
     warning ("gl-render: data values greater than float capacity.  (1) Scale data, or (2) Use gnuplot");
     return;