1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

If a delimiter is used, then quote the backslash character as well.

Problem noted by Rainer Perske.
This commit is contained in:
David Shaw 2002-03-29 16:52:07 +00:00
parent d56fb26c55
commit 47c8a325f5
3 changed files with 14 additions and 4 deletions

View file

@ -476,7 +476,8 @@ utf8_to_native( const char *string, size_t length, int delim )
}
if( !nleft ) {
if( !(*s & 0x80) ) { /* plain ascii */
if( *s < 0x20 || *s == 0x7f || *s == delim) {
if( *s < 0x20 || *s == 0x7f || *s == delim ||
(delim && *s=='\\')) {
n++;
if( p )
*p++ = '\\';