1.1 diff -r 8d7bd2fa5db6 -r 41804cc569ab bitblt.c 1.2 --- a/bitblt.c Wed Jan 02 10:17:24 2002 +0000 1.3 +++ b/bitblt.c Wed Jan 02 10:17:48 2002 +0000 1.4 @@ -12,20 +12,23 @@ 1.5 #endif 1.6 } 1.7 1.8 -static inline u32 rect_width (Rect r) 1.9 +static inline s32 rect_width (Rect r) 1.10 { 1.11 return (r.lower_right.x - r.upper_left.x); 1.12 } 1.13 1.14 -static inline u32 rect_height (Rect r) 1.15 +static inline s32 rect_height (Rect r) 1.16 { 1.17 return (r.lower_right.y - r.upper_left.y); 1.18 } 1.19 1.20 -Bitmap *create_bitmap (u32 width, u32 height) 1.21 +Bitmap *create_bitmap (s32 width, s32 height) 1.22 { 1.23 Bitmap *bitmap; 1.24 1.25 + if ((width <= 0) || (height <= 0)) 1.26 + return (NULL); 1.27 + 1.28 bitmap = calloc (1, sizeof (Bitmap)); 1.29 if (! bitmap) 1.30 return (NULL);