X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=libctgraphics%2Fezplot.cpp;h=7038132c128db2a6ed0f4ef68457676594aadbda;hb=2a39ee3b125e3e2e68bbba2ac15a65039456ff7e;hp=45796684b2741dc822a69029e67a3718f062ef57;hpb=08a5cd04c3994d5ea24713b9b000791bd2e406fe;p=ctsim.git diff --git a/libctgraphics/ezplot.cpp b/libctgraphics/ezplot.cpp index 4579668..7038132 100644 --- a/libctgraphics/ezplot.cpp +++ b/libctgraphics/ezplot.cpp @@ -6,7 +6,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ezplot.cpp,v 1.9 2000/07/29 19:50:08 kevin Exp $ +** $Id: ezplot.cpp,v 1.11 2000/08/22 07:02:48 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -253,8 +253,8 @@ EZPlot::plot () } /* find nice endpoints for axes */ - axis_scale (xmin, xmax, o_xmajortick - 1, &xgw_min, &xgw_max, &x_nint); - axis_scale (ymin, ymax, o_ymajortick - 1, &ygw_min, &ygw_max, &y_nint); + if (! axis_scale (xmin, xmax, o_xmajortick - 1, &xgw_min, &xgw_max, &x_nint) || ! axis_scale (ymin, ymax, o_ymajortick - 1, &ygw_min, &ygw_max, &y_nint)) + return; /* check if user set x-axis extents */ if (s_xmin == TRUE) { @@ -827,7 +827,7 @@ int EZPlot::axis_scale (double min, double max, int nint, double *minp, double *maxp, int *nintp) { if (min >= max || nint < 1) { - sys_error (ERR_WARNING, "Invalid params: min=%lf, min=%lf, num intervals=%d [axis_scale]", min, max, nint); + sys_error (ERR_WARNING, "Invalid params: min=%lf, max=%lf, num intervals=%d [axis_scale]", min, max, nint); return (FALSE); }