Status

()

defect
P3
normal
VERIFIED FIXED
20 years ago
20 years ago

People

(Reporter: rbs, Assigned: troy)

Tracking

Trunk
x86
Windows 95
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

()

nsTextFrame.cpp has the following declaration:

 70 #ifndef PR_ABS
 71 #define PR_ABS(x) (x < 0 ? -x : x)
 72 #endif

and PR_ABS is later used as:

        if (found) {
2033           PRInt32 charWidth;
2034           acx->GetWidth(text[indx], charWidth);
2035           charWidth /= 2;
2036 
2037           if (PR_ABS(PRInt32(aPoint.x) - origin.x) > textWidth+charWidth) {
2038             indx++;
2039           }
2040         }


Seems like more parentheses are needed...
 71 #define PR_ABS(x) ((x) < 0 ? -(x) : (x))
Ccing evaughan because of a similar definition in nsSplitterFrame.cpp.
(This is just to raise awareness since the macro is not used there --yet!)
Checked in patch supplied by rbs@maths.uq.edu.au
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Marking verified per last comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.