[2/2] comctl32: replace nonprintable characters with spaces on SB_SETTEXT

Alexandre Julliard julliard at winehq.org
Tue Mar 3 06:31:23 CST 2009


Nikolay Sivov <bunglehead at gmail.com> writes:

> @@ -775,6 +777,16 @@ STATUSBAR_SetTextT (STATUS_INFO *infoPtr, INT nPart, WORD style,
>  	    strcpyW (ntext, text);
>  	} else ntext = 0;
>  
> +	/* replace nonprintable characters with spaces */
> +	if (ntext) {
> +	    idx = ntext;
> +	    while (*idx) {
> +	        if(!isprintW(*idx))
> +	            *idx = space;
> +	        idx++;

This would need some test cases with various invalid chars to confirm
that isprintW is the right check to use.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list