}
else
{
- UInt32 posSlot, lenToPosState;
+ UInt32 posSlot;
RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0);
p->state = kMatchNextStates[p->state];
if (len < LZMA_MATCH_LEN_MIN)
LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices);
pos -= LZMA_NUM_REPS;
GetPosSlot(pos, posSlot);
- lenToPosState = GetLenToPosState(len);
- if (lenToPosState >= kNumLenToPosStates)
- {
- p->result = SZ_ERROR_DATA;
- return CheckErrors(p);
- }
- RcTree_Encode(&p->rc, p->posSlotEncoder[lenToPosState], kNumPosSlotBits, posSlot);
+ RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot);
if (posSlot >= kStartPosModelIndex)
{