We use it instead of direct PPM.DecodeChar call to be sure that we reset PPM structures in case of corrupt data. It is important, because these structures can be invalid after PPM.DecodeChar returned -1.
| 2 | // we reset PPM structures in case of corrupt data. It is important, |
| 3 | // because these structures can be invalid after PPM.DecodeChar returned -1. |
| 4 | inline int Unpack::SafePPMDecodeChar() |
| 5 | { |
| 6 | int Ch=PPM.DecodeChar(); |
| 7 | if (Ch==-1) // Corrupt PPM data found. |
| 8 | { |
| 9 | PPM.CleanUp(); // Reset possibly corrupt PPM data structures. |
| 10 | UnpBlockType=BLOCK_LZ; // Set faster and more fail proof LZ mode. |
| 11 | } |
| 12 | return(Ch); |
| 13 | } |
| 14 | |
| 15 | |
| 16 | void Unpack::Unpack29(bool Solid) |
nothing calls this directly
no test coverage detected