Skip to content

Commit

Permalink
Modbus: trim strings left and right (#17413)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig authored Nov 23, 2024
1 parent 499f9e9 commit 7eabc78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion provider/modbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (m *Modbus) StringGetter() (func() (string, error), error) {
return "", err
}

return strings.TrimSpace(string(bytes.TrimLeft(b, "\x00"))), nil
return strings.TrimSpace(string(bytes.Trim(b, "\x00"))), nil
}, nil
}

Expand Down

0 comments on commit 7eabc78

Please sign in to comment.