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:
@@ -652,12 +652,13 @@ get_tty_index(const char *name)
|
|||||||
{
|
{
|
||||||
// device names follow this form: "pt/%c%x"
|
// device names follow this form: "pt/%c%x"
|
||||||
int8 digit = name[4];
|
int8 digit = name[4];
|
||||||
if (digit >= 'a')
|
if (digit >= 'a') {
|
||||||
digit -= 'a';
|
// hexadecimal digits
|
||||||
else
|
digit -= 'a' - 10;
|
||||||
|
} else
|
||||||
digit -= '0';
|
digit -= '0';
|
||||||
|
|
||||||
return (name[3] - 'p') * digit;
|
return (name[3] - 'p') * 16 + digit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user