Mercurial > hg > xemacs-beta
comparison src/unicode.c @ 4688:7e54adf407a1
Fix a bug with Unicode error sequences and very short input strings.
src/ChangeLog addition:
2009-09-11 Aidan Kehoe <kehoea@parhasard.net>
* unicode.c (unicode_convert):
Fix a bug with error sequences and very short input strings.
tests/ChangeLog addition:
2009-09-11 Aidan Kehoe <kehoea@parhasard.net>
* automated/mule-tests.el (featurep):
Check that a Unicode bug with very short inputs has been fixed.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Fri, 11 Sep 2009 17:54:07 +0100 |
parents | 2669b1b7e33b |
children | 257b468bf2ca |
comparison
equal
deleted
inserted
replaced
4687:02b7c7189041 | 4688:7e54adf407a1 |
---|---|
2219 default: ABORT (); | 2219 default: ABORT (); |
2220 } | 2220 } |
2221 | 2221 |
2222 } | 2222 } |
2223 | 2223 |
2224 if (str->eof && ch) | 2224 if (str->eof && counter) |
2225 { | 2225 { |
2226 switch (type) | 2226 switch (type) |
2227 { | 2227 { |
2228 case UNICODE_UTF_8: | 2228 case UNICODE_UTF_8: |
2229 indicate_invalid_utf_8(indicated_length, | 2229 indicate_invalid_utf_8(indicated_length, |
2275 } | 2275 } |
2276 else assert(0); | 2276 else assert(0); |
2277 break; | 2277 break; |
2278 } | 2278 } |
2279 ch = 0; | 2279 ch = 0; |
2280 counter = 0; | |
2280 } | 2281 } |
2281 | 2282 |
2282 data->counter = counter; | 2283 data->counter = counter; |
2283 data->indicated_length = indicated_length; | 2284 data->indicated_length = indicated_length; |
2284 } | 2285 } |