Ticket #19 (new defect)
Opened 9 years ago
Another Int Bug
|Reported by:||dom||Owned by:||dom|
If we ever get something with more than 2^31 - 1 octets, this will give the wrong result silently :-( The fix should be in binary get. I recall there was a version in which this was Int64 or Integer but it's not worth researching now.
decodeUInt :: (MonadError [Char] (t1 BG.BitGet), MonadTrans t1) => t1 BG.BitGet Integer decodeUInt = do o <- octets return (from2sComplement o) where chunkBy8 = let compose = (.).(.) in lift `compose` (flip (const (BG.getLeftByteString . fromIntegral . (*8)))) octets = decodeLargeLengthDeterminant chunkBy8 undefined