From ad5ccd2d6191cc6fd53c0faf4c3d0a4b2b75b052 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Thu, 25 May 2017 12:16:06 +0200 Subject: [PATCH] plotit.c, check for infinite y values --- src/frontend/plotting/plotit.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/frontend/plotting/plotit.c b/src/frontend/plotting/plotit.c index 1f576cc2f..36c7ab503 100644 --- a/src/frontend/plotting/plotit.c +++ b/src/frontend/plotting/plotit.c @@ -866,6 +866,11 @@ plotit(wordlist *wl, char *hcopy, char *devname) goto quit; } + if(isinf(ylims[0]) || isinf(ylims[1])) { + fprintf(cp_err, "Error: Y values must not be infinite\n"); + goto quit; + } + /* Fix the plot limits for smith and polar grids. */ if ((!xlim || !ylim) && (gtype == GRID_POLAR)) { double mx, my, rad;