screen parsing fixed

Would result to invalid screen option, since it would parse width three times instead of other parameters.

```
WRN invalid screen option 1280x1280@1280 module=remote,
```
This commit is contained in:
Miroslav Šedivý 2020-04-19 14:11:44 +02:00 committed by GitHub
parent 7d5d35e5ae
commit fa945d156f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,8 +124,8 @@ func (s *Remote) Set() {
if len(res) > 0 { if len(res) > 0 {
width, err1 := strconv.ParseInt(res[1], 10, 64) width, err1 := strconv.ParseInt(res[1], 10, 64)
height, err2 := strconv.ParseInt(res[1], 10, 64) height, err2 := strconv.ParseInt(res[2], 10, 64)
rate, err3 := strconv.ParseInt(res[1], 10, 64) rate, err3 := strconv.ParseInt(res[3], 10, 64)
if err1 == nil && err2 == nil && err3 == nil { if err1 == nil && err2 == nil && err3 == nil {
s.ScreenWidth = int(width) s.ScreenWidth = int(width)