get_tty_index() did not work correctly, this fixes bug #265 (included the fixed
version, thanks barber). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16624 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
91d4f7a30a
commit
67e33e3e70
@ -652,12 +652,13 @@ get_tty_index(const char *name)
|
||||
{
|
||||
// device names follow this form: "pt/%c%x"
|
||||
int8 digit = name[4];
|
||||
if (digit >= 'a')
|
||||
digit -= 'a';
|
||||
else
|
||||
if (digit >= 'a') {
|
||||
// hexadecimal digits
|
||||
digit -= 'a' - 10;
|
||||
} else
|
||||
digit -= '0';
|
||||
|
||||
return (name[3] - 'p') * digit;
|
||||
return (name[3] - 'p') * 16 + digit;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user