To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=96059
                 Issue #|96059
                 Summary|transex3: dodgy use of && and ||
               Component|l10n
                 Version|DEV300m35
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|pjanik
             Reported by|cmc





------- Additional comments from [EMAIL PROTECTED] Mon Nov 10 17:03:21 +0000 
2008 -------
in transex3/source/export2.cxx we have...

if( i+2 < rString.Len() &&
   rString.GetChar( i+1 ) == 'b' || rString.GetChar( i+1 ) == 'B' &&
   rString.GetChar( +2 ) == '>' )

i.e. 

if (a && b || c && d)

rules of precedence means this is equivalent to 

if ( (a && b) || (c && d) )

i.e. 

if( (i+2 < rString.Len() &&
   rString.GetChar( i+1 ) == 'b') || (rString.GetChar( i+1 ) == 'B' &&
   rString.GetChar( +2 ) == '>') )

which really doesn't look like what this code probably wants to do.

Attached is a patch to do the more likely 

if( i+2 < rString.Len() &&
   (rString.GetChar( i+1 ) == 'b' || (rString.GetChar( i+1 ) == 'B') &&
   rString.GetChar( +2 ) == '>') )

including the same type of thing later on

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to