From 490ae0bb195c20b6380ddb746394d7d3afd65e70 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Fri, 10 Jul 2009 22:48:48 +0000 Subject: [PATCH] Submitted by Roger Wolff: bug #26527: bug in unicode conversion * ser_avrdoper.c (convertUniToAscii): when encountering a UTF-16 character that cannot be converted to ASCII, increment the UTF-16 pointer anyway when proceeding. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@837 81a1dc3b-b13d-400b-aceb-764788c761c2 --- avrdude/ChangeLog | 8 ++++++++ avrdude/ser_avrdoper.c | 1 + 2 files changed, 9 insertions(+) diff --git a/avrdude/ChangeLog b/avrdude/ChangeLog index d7414119..b1caf313 100644 --- a/avrdude/ChangeLog +++ b/avrdude/ChangeLog @@ -1,3 +1,11 @@ +2009-07-11 Joerg Wunsch + + Submitted by Roger Wolff: + bug #26527: bug in unicode conversion + * ser_avrdoper.c (convertUniToAscii): when encountering a UTF-16 + character that cannot be converted to ASCII, increment the UTF-16 + pointer anyway when proceeding. + 2009-07-11 Joerg Wunsch * jtagmkI.c (jtagmkI_send): Replace %zd format by %u since not all diff --git a/avrdude/ser_avrdoper.c b/avrdude/ser_avrdoper.c index eb537ad1..ad3564ad 100644 --- a/avrdude/ser_avrdoper.c +++ b/avrdude/ser_avrdoper.c @@ -92,6 +92,7 @@ static void convertUniToAscii(char *buffer) while(*uni != 0){ if(*uni >= 256){ *ascii++ = '?'; + uni++; }else{ *ascii++ = *uni++; }