repo: rxvt-unicode-sixel
action: commit
revision: 
path_from: 
revision_from: 6ca97ef6ed95287552d31b9d2e001f1cb1cc6927:
path_to: 
revision_to: 
git.thebackupbox.net
rxvt-unicode-sixel
git clone git://git.thebackupbox.net/rxvt-unicode-sixel
commit 6ca97ef6ed95287552d31b9d2e001f1cb1cc6927
Author: Marc Lehmann 
Date:   Wed Feb 27 01:05:55 2008 +0000

    *** empty log message ***

diff --git a/src/main.C b/src/main.C
index 2cb48f8197caa52291264a2175dc593e2e470d2c..
index ..a94cb295f65998032558fa8b8d258d2006a02c6b 100644
--- 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-----