[quake3-bugzilla] [Bug 4227] New: Sign mismatch with negative numbers in $evalfloat and $evalint

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Mon Oct 19 19:30:13 EDT 2009


http://bugzilla.icculus.org/show_bug.cgi?id=4227

           Summary: Sign mismatch with negative numbers in $evalfloat and
                    $evalint
           Product: ioquake3
           Version: SVN HEAD
          Platform: All
        OS/Version: All
            Status: RESOLVED
          Severity: minor
          Priority: P3
         Component: Misc
        AssignedTo: zakk at icculus.org
        ReportedBy: makro at rq3.com
         QAContact: quake3-bugzilla at icculus.org
                CC: arny at ats.s.bawue.de


Thilo Schulz <arny at ats.s.bawue.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |arny at ats.s.bawue.de
         Resolution|                            |FIXED

There's a bug in the PC_DollarDirective_evalint and
PC_DollarDirective_evalfloat functions in botlib/l_precomp.c that causes a sign
mismatch in the token that is pushed on the stack if the result is negative.
The problem is that token.string gets sprintf'ed to the absolute value of the
result, but token.floatvalue retains the sign, which is incorrect, considering
the extra sign token that is pushed on the stack (with UnreadSignToken). As a
bonus, token.intvalue (unsigned long) gets the same value as token.floatvalue!

Expected behaviour: both token.intvalue and token.floatvalue should be assigned
[f]abs(value).

--- Comment #1 from Thilo Schulz <arny at ats.s.bawue.de> 2009-10-19 19:30:09 EDT ---
Fixed in r1688

-- 
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the quake3-bugzilla mailing list