From 8b1a44dd2f7f61b3b38a2f6966985c32ed178c62 Mon Sep 17 00:00:00 2001 From: thurston Date: Fri, 23 Jan 2009 17:35:33 +0000 Subject: [PATCH] Fixed a problem reading hex numbers that have the high bit set when the 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 | 2 +- ragel/parsedata.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CREDITS b/CREDITS index b1f68e3..c18d81d 100644 --- 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ò, - Jose Quinteiro + Jose Quinteiro, William Morgan, _why diff --git a/ragel/parsedata.cpp b/ragel/parsedata.cpp index 4626fa0..cb5208f 100644 --- a/ragel/parsedata.cpp +++ b/ragel/parsedata.cpp @@ -116,7 +116,7 @@ Key makeFsmKeyHex( char *str, const InputLoc &loc, ParseData *pd ) } 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 ); } -- 2.7.4