1
0
Fork 0
forked from len0rd/rockbox

For shortname creation, replace most illegal characters by underscores instead of removing them, thereby lowering the chance to create a blank (illegal) name. Spaces and control chars are still removed.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5991 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-02-16 21:56:20 +00:00
parent 3eb45f9313
commit f213afacbe

View file

@ -1432,7 +1432,7 @@ unsigned char char2dos(unsigned char c)
case 0xe5: /* Special kanji character */
c = 0x05;
break;
case 0x20:
case 0x22:
case 0x2a:
case 0x2b:
@ -1448,14 +1448,14 @@ unsigned char char2dos(unsigned char c)
case 0x5c:
case 0x5d:
case 0x7c:
/* Illegal name */
c = 0;
/* Illegal name, replace */
c = '_';
break;
default:
if(c < 0x20)
if(c <= 0x20)
{
/* Illegal name */
/* Illegal name, remove */
c = 0;
}
break;