From: Rick Bird Date: Sun, 27 Mar 2011 05:24:06 +0000 (-0400) Subject: 182p8 - width() and height() do not return 0 when set to invalid input. X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=dddffec35ba4f9747b86bb60a8f93d78c988be47;p=cobramush.git 182p8 - width() and height() do not return 0 when set to invalid input. --- diff --git a/src/bsd.c b/src/bsd.c index b75be8b..5ce7127 100644 --- a/src/bsd.c +++ b/src/bsd.c @@ -4589,7 +4589,7 @@ FUNCTION(fun_width) DESC *match; if (!*args[0]) safe_str(T("#-1 FUNCTION REQUIRES ONE ARGUMENT"), buff, bp); - else if ((match = lookup_desc(executor, args[0]))) + else if ((match = lookup_desc(executor, args[0])) && match->width > 0) safe_integer(match->width, buff, bp); else if (args[1]) safe_str(args[1], buff, bp); @@ -4602,7 +4602,7 @@ FUNCTION(fun_height) DESC *match; if (!*args[0]) safe_str(T("#-1 FUNCTION REQUIRES ONE ARGUMENT"), buff, bp); - else if ((match = lookup_desc(executor, args[0]))) + else if ((match = lookup_desc(executor, args[0])) && match->height > 0) safe_integer(match->height, buff, bp); else if (args[1]) safe_str(args[1], buff, bp);