diff --git a/core/lib/petsciiconv.c b/core/lib/petsciiconv.c index 58b598914..93056fefc 100644 --- a/core/lib/petsciiconv.c +++ b/core/lib/petsciiconv.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki desktop environment for the C64. * - * $Id: petsciiconv.c,v 1.1 2006/06/17 22:41:18 adamdunkels Exp $ + * $Id: petsciiconv.c,v 1.2 2010/01/31 23:46:19 oliverschmidt Exp $ * */ @@ -89,15 +89,17 @@ petsciiconv_toascii(char *buf, unsigned int len) c = 0x0d; } else if(c == 0x0d) { c = 0x0a; - } - switch (c & 0xe0) { - case 0x40: - case 0x60: - c ^= 0x20; - break; - case 0xc0: - c ^= 0x80; - break; + } + if(c != 0x40) { + switch (c & 0xe0) { + case 0x40: + case 0x60: + c ^= 0x20; + break; + case 0xc0: + c ^= 0x80; + break; + } } *ptr = c & 0x7f; ++ptr;