From dddffec35ba4f9747b86bb60a8f93d78c988be47 Mon Sep 17 00:00:00 2001 From: Rick Bird Date: Sun, 27 Mar 2011 01:24:06 -0400 Subject: [PATCH] 182p8 - width() and height() do not return 0 when set to invalid input. --- src/bsd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.30.2