ntdll: rtlstr.c: Implement checking for control characters in RtlIsTextUnicode [try 4]

Michael Karcher wine at mkarcher.dialup.fu-berlin.de
Thu Jun 19 17:14:57 CDT 2008

Am Donnerstag, den 19.06.2008, 12:52 -0700 schrieb Zac Brown:
> - Because these tests are mutually exclusive, a single goto label suffices for 
> breaking the loop.

As written, your tests are not mutually exclusive. It could happen that
set and out_flags contains IS_TEXT_UNICODE_REVERSE_SIGNATURE. (If the
caller doesn't provide flags, both flags are set, in fact!) In that
case, both conditions of your if statements are true.

I don't know whether that means that you need two goto targets or that
your logic should be changed, but I suspect the latter. If you test for
reversed control characters only I a reversed BOM was found, you should
not test for non-reversed control characters if a reversed BOM was
found, according to my intuition.

  Michael Karcher

More information about the wine-devel mailing list