소스 검색

Add assert that shiftcnt remains in bounds on decrement

pull/13/head
Sergey Urbanovich 13 년 전
부모
커밋
dbbf864bb9
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. +4
    -2
      c_src/encoder.c

+ 4
- 2
c_src/encoder.c 파일 보기

@ -430,7 +430,8 @@ enc_start_object(Encoder* e)
static inline int
enc_end_object(Encoder* e)
{
e->shiftcnt--;
if (!e->shiftcnt--)
return 0;
return MAYBE_PRETTY_INDENT(e) && enc_char(e, '}');
}
@ -445,7 +446,8 @@ enc_start_array(Encoder* e)
static inline int
enc_end_array(Encoder* e)
{
e->shiftcnt--;
if (!e->shiftcnt--)
return 0;
return MAYBE_PRETTY_INDENT(e) && enc_char(e, ']');
}

불러오는 중...
취소
저장