GO-E: fix panic on invalid RFID index (#25226)
This commit is contained in:
parent
b928514dd8
commit
b4cfa95926
1 changed files with 1 additions and 1 deletions
|
|
@ -65,7 +65,7 @@ func (g *StatusResponse2) Voltages() (float64, float64, float64) {
|
|||
}
|
||||
|
||||
func (g *StatusResponse2) Identify() string {
|
||||
if g.Trx > 0 {
|
||||
if g.Trx > 0 && len(g.Cards) >= g.Trx {
|
||||
return g.Cards[g.Trx-1].Name
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue