Re: [2/2] comctl32: replace nonprintable characters with spaces on SB_SETTEXT
Nikolay Sivov <bunglehead(a)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(a)winehq.org
Alexandre Julliard wrote:
Nikolay Sivov <bunglehead(a)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.
Sure, will make it soon.
participants (2)
-
Alexandre Julliard -
Nikolay Sivov