Use unsigned values for termios setting
This allows the last (most significant) bit to be set without overflow errors. The error becomes visible after adding the CRTSCTS constant on linux/386: const tcCRTSCTS uint = 0x80000000
This commit is contained in:
@@ -143,7 +143,7 @@ func setTermSettingsBaudrate(speed int, settings *syscall.Termios) error {
|
||||
return &PortError{code: InvalidSpeed}
|
||||
}
|
||||
// revert old baudrate
|
||||
BAUDMASK := 0
|
||||
var BAUDMASK uint
|
||||
for _, rate := range baudrateMap {
|
||||
BAUDMASK |= rate
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user