Convert '@' correctly from PETSCII to ASCII - by leaving it alone.

This commit is contained in:
oliverschmidt 2010-01-31 23:46:19 +00:00
parent fc7b0d31bc
commit 3f142f0718
1 changed files with 12 additions and 10 deletions

View File

@ -29,7 +29,7 @@
* *
* This file is part of the Contiki desktop environment for the C64. * 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 $
* *
*/ */
@ -90,6 +90,7 @@ petsciiconv_toascii(char *buf, unsigned int len)
} else if(c == 0x0d) { } else if(c == 0x0d) {
c = 0x0a; c = 0x0a;
} }
if(c != 0x40) {
switch (c & 0xe0) { switch (c & 0xe0) {
case 0x40: case 0x40:
case 0x60: case 0x60:
@ -99,6 +100,7 @@ petsciiconv_toascii(char *buf, unsigned int len)
c ^= 0x80; c ^= 0x80;
break; break;
} }
}
*ptr = c & 0x7f; *ptr = c & 0x7f;
++ptr; ++ptr;
} }