From fd9ca573b22ec00c2c54ab49c271485c249c234d Mon Sep 17 00:00:00 2001 From: Aaron Plattner Date: Mon, 29 Aug 2011 21:12:42 -0700 Subject: xts5: XCreateColormap-11: Bogus visuals return BadMatch, not BadValue According to the X11 protocol specification, "The visual type must be one supported by the screen (or a Match error results)." It does not say anything about invalid visual IDs causing Value errors. Reported-by: Nalluri Harikrishna Reported-by: Rahul Singhal Signed-off-by: Aaron Plattner --- xts5/Xlib7/XCreateColormap.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xts5/Xlib7') diff --git a/xts5/Xlib7/XCreateColormap.m b/xts5/Xlib7/XCreateColormap.m index 272b6f00..ec825b15 100644 --- a/xts5/Xlib7/XCreateColormap.m +++ b/xts5/Xlib7/XCreateColormap.m @@ -600,20 +600,20 @@ error occurs. >>ASSERTION Bad A When xname is called with an invalid visual, then a -.S BadValue +.S BadMatch error occurs. >>STRATEGY Make a visual structure invalid using badvis. Create a colourmap for this visual with XCreateColorMap. -Verify that a BadValue error occurred. ->>CODE BadValue +Verify that a BadMatch error occurred. +>>CODE BadMatch Visual vi; alloc = AllocNone; badvis(&vi); visual = &vi; XCALL; - if(geterr() == BadValue) + if(geterr() == BadMatch) PASS; >>ASSERTION Bad A .ER BadWindow -- cgit v1.2.3