Apache OpenOffice (AOO) Bugzilla – Issue 96058
unotools: ambiguous && and ||
Last modified: 2009-02-25 09:26:32 UTC
unotools/source/ucbhelper/ucbhelper.cxx has the following code.. BOOL bWild = bAllowWildCards && rName.Search( '*' ) != STRING_NOTFOUND || rName.Search( '?' ) != STRING_NOTFOUND; which precedence-wise binds as... BOOL bWild = (bAllowWildCards && rName.Search( '*' ) != STRING_NOTFOUND) || rName.Search( '?' ) != STRING_NOTFOUND; (as attachment one would do), but that looks really suspicious, I suspect it should be BOOL bWild = bAllowWildCards && (rName.Search( '*' ) != STRING_NOTFOUND || rName.Search( '?' ) != STRING_NOTFOUND); as attachment two does
Created attachment 57840 [details] what we're currently saying
Created attachment 57841 [details] what I suspect we want to say
fs->mba: your code, cvs-blame-wise
Yes, it looks as if indeed that the current code is wrong. Thanks for the patch.
Fixed in CWS mba31issues01
@cmc: i've set this to "verified" as I know you will check this in the master anyway. :-)
closed, seen DEV300_m42