[PATCH 6/6] ole32: Implement MkParseDisplayName.

Juan Lang juan_lang at yahoo.com
Tue Mar 27 15:21:31 CDT 2007

Hi Rob,

+/* find a character from a set in reverse without the string having to be
null-terminated */
+static inline WCHAR *memrpbrkW(const WCHAR *ptr, size_t n, const WCHAR
+    const WCHAR *end, *ret = NULL;
+    for (end = ptr + n; ptr < end; ptr++) if (strchrW(accept, *ptr)) ret
= ptr;
+    return (WCHAR *)ret;

Maybe it's because I'm dense and I don't particularly like three levels of
indent on a single line, but this doesn't seem to do what I'd expect.  The
for loop doesn't quit when ret is assigned, thus, this will always find
the last character, from left to right, from accept in ptr, rather than
the first.

Don't you mean "ptr < end && !ret"?  And in what sense is this "in

Bored stiff? Loosen up... 
Download and play hundreds of games for free on Yahoo! Games.

More information about the wine-devel mailing list