Skip to content

Commit

Permalink
Merge pull request #33 from greenfoo/incorrect_pwd_segfault
Browse files Browse the repository at this point in the history
Fix segfault when entering incorrect password
  • Loading branch information
mrusme committed Jun 21, 2023
2 parents c85b402 + 7e64143 commit f0ac5c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ func loadSystems(c *ctx.Ctx) []error {
errs = append(errs, err)
} else {
c.Logger.Debugf("loaded %s system", sysCfg.Type)

c.AddSystem(&sys)
c.Logger.Debugf("setting system ID to %d", c.NumSystems()-1)
sys.SetID(c.NumSystems() - 1)
}

c.AddSystem(&sys)
c.Logger.Debugf("setting system ID to %d", c.NumSystems()-1)
sys.SetID(c.NumSystems() - 1)
}

return errs
Expand Down

0 comments on commit f0ac5c9

Please sign in to comment.