Ticket #19 (new defect)

Opened 9 years ago

Another Int Bug

Reported by: dom Owned by: dom
Priority: major Milestone:
Component: component1 Version:
Keywords: Cc:


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)
      chunkBy8 = let compose = (.).(.) in lift `compose` (flip (const
(BG.getLeftByteString . fromIntegral . (*8))))
      octets   = decodeLargeLengthDeterminant chunkBy8 undefined
Note: See TracTickets for help on using tickets.