소스 검색

Fix segfaul when encoding with the uescape option

There was a bug that was resetting the extra amount of space needed when
encoding unicode characters with the `uescape` option enabled.
pull/21/merge 0.4.2
Paul J. Davis 13 년 전
부모
커밋
d127364b13
2개의 변경된 파일3460개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      c_src/encoder.c
  2. +3459
    -0
      test/009-reg-issue-24.t

+ 1
- 1
c_src/encoder.c 파일 보기

@ -274,7 +274,7 @@ enc_string(Encoder* e, ERL_NIF_TERM val)
if(uval < 0) {
return 0;
}
esc_extra = utf8_esc_len(uval);
esc_extra += utf8_esc_len(uval);
if(ulen < 0) {
return 0;
}

+ 3459
- 0
test/009-reg-issue-24.t
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


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