serial_mouse: fix string length

This commit is contained in:
François Revol 2014-08-29 20:30:56 +02:00
parent 821075b6ce
commit 61b007a076

View File

@ -117,8 +117,8 @@ SerialMouse::IsMousePresent()
// Skip internal modem (pctel, lucent or trimodem drivers).
// previously I checked only for != "pctel", now for == "serial#"
if (strncmp(dev_name, "serial", 5) != 0
&& strncmp(dev_name, "pc_serial", 8) != 0)
if (strncmp(dev_name, "serial", 6) != 0
&& strncmp(dev_name, "pc_serial", 9) != 0)
continue;
if (fSerialPort->Open(dev_name) <= 0) {