Fixed a problem reading hex numbers that have the high bit set when the
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Fri, 23 Jan 2009 17:35:33 +0000 (17:35 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Fri, 23 Jan 2009 17:35:33 +0000 (17:35 +0000)
alphabet is signed and on 64 bit. Reported by _why. Fix provided by Wialliam
Morgan. The literal 0xffffffff was used for a fully set long when -1L should be
used instead.

git-svn-id: http://svn.complang.org/ragel/trunk@663 052ea7fc-9027-0410-9066-f65837a77df0

CREDITS
ragel/parsedata.cpp

diff --git a/CREDITS b/CREDITS
index b1f68e3..c18d81d 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -38,4 +38,4 @@ missed.
     Kenny MacDermid, MenTaLguY, Manoj Rajagopalan, Tim Chklovski,
     Mikkel Fahnøe Jørgensen, Andrei Polushin, Evan Phoenix, David Balmain,
     Ross Thomas, Mitchell Foral, John D. Mitchell, Diego 'Flameeyes' Pettenò,
     Kenny MacDermid, MenTaLguY, Manoj Rajagopalan, Tim Chklovski,
     Mikkel Fahnøe Jørgensen, Andrei Polushin, Evan Phoenix, David Balmain,
     Ross Thomas, Mitchell Foral, John D. Mitchell, Diego 'Flameeyes' Pettenò,
-    Jose Quinteiro
+    Jose Quinteiro, William Morgan, _why
index 4626fa0..cb5208f 100644 (file)
@@ -116,7 +116,7 @@ Key makeFsmKeyHex( char *str, const InputLoc &loc, ParseData *pd )
        }
 
        if ( unusedBits && keyOps->alphType->isSigned && ul >> (size * 8 - 1) )
        }
 
        if ( unusedBits && keyOps->alphType->isSigned && ul >> (size * 8 - 1) )
-               ul |= (0xffffffff >> (size*8 ) ) << (size*8);
+               ul |= ( 0xffffffff >> (size*8) ) << (size*8);
 
        return Key( (long)ul );
 }
 
        return Key( (long)ul );
 }