]> git.pond.sub.org Git - empserver/commitdiff
Oops on funny xysize_range() arguments
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 17 Aug 2008 02:07:28 +0000 (22:07 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 19 Aug 2008 12:54:04 +0000 (08:54 -0400)
Comments claimed funny arguments could happen.  I don't think so.

src/lib/subs/snxtsct.c

index 68f4ccf2635a4dd54fe9500551193742f0c8bc83..65aef15aefc4c62de2ebfb08540906b523220ec0 100644 (file)
@@ -166,20 +166,14 @@ xysize_range(struct range *rp)
        rp->width = WORLD_X + rp->hx - rp->lx;
     else
        rp->width = rp->hx - rp->lx;
-#ifndef HAY
-    /* This is a necessary check for small, hitech worlds. */
-    if (rp->width > WORLD_X)
+    if (CANT_HAPPEN(rp->width > WORLD_X))
        rp->width = WORLD_X;
-#endif
     if (rp->ly >= rp->hy)
        rp->height = WORLD_Y + rp->hy - rp->ly;
     else
        rp->height = rp->hy - rp->ly;
-#ifndef HAY
-    /* This is a necessary check for small, hitech worlds. */
-    if (rp->height > WORLD_Y)
+    if (CANT_HAPPEN(rp->height > WORLD_Y))
        rp->height = WORLD_Y;
-#endif
 }
 
 /* This is called also called in snxtitem.c */