Parcourir la source

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 il y a 13 ans
Parent
révision
d127364b13
2 fichiers modifiés avec 3460 ajouts et 1 suppressions
  1. +1
    -1
      c_src/encoder.c
  2. +3459
    -0
      test/009-reg-issue-24.t

+ 1
- 1
c_src/encoder.c Voir le fichier

@ -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
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


Chargement…
Annuler
Enregistrer