repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 6ca97ef6ed95287552d31b9d2e001f1cb1cc6927: path_to: revision_to:
commit 6ca97ef6ed95287552d31b9d2e001f1cb1cc6927 Author: Marc LehmannDate: Wed Feb 27 01:05:55 2008 +0000 *** empty log message *** diff --git a/src/main.C b/src/main.C
--- a/src/main.C
+++ b/src/main.C
@@ -524,13 +524,19 @@ rxvt_term::window_calc (unsigned int newwidth, unsigned int newheight)
if (flags & WidthValue)
{
- ncol = clamp (w, 0, std::numeric_limits::max ());
+ if (!w)
+ rxvt_fatal ("illegal window geometry (width and height must be non-zero), aborting.\n");
+
+ ncol = clamp (w, 1, std::numeric_limits::max ());
szHint.flags |= USSize;
}
if (flags & HeightValue)
{
- nrow = clamp (h, 0, std::numeric_limits::max ());
+ if (!h)
+ rxvt_fatal ("illegal window geometry (width and height must be non-zero), aborting.\n");
+
+ nrow = clamp (h, 1, std::numeric_limits::max ());
szHint.flags |= USSize;
}
@@ -561,9 +567,6 @@ rxvt_term::window_calc (unsigned int newwidth, unsigned int newheight)
szHint.win_gravity = SouthWestGravity;
}
}
-
- if (!szHint.width || !szHint.height)
- rxvt_fatal ("window width or height must not be zero, aborting.\n");
}
/* TODO: BOUNDS */
-----END OF PAGE-----