Array logic was stupid; incorrect marshal dereference.
This commit is contained in:
parent
f78b158d49
commit
14d26524bd
1 changed files with 2 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ func (s *ScriptureStore) GetVerse() *Scripture {
|
|||
s.Offset++
|
||||
return s.Verses[s.Offset]
|
||||
}
|
||||
if len(s.Verses) > 0 {
|
||||
if len(s.Verses) == 1 {
|
||||
s.Offset = 1
|
||||
return s.Verses[0]
|
||||
}
|
||||
|
|
@ -53,7 +53,7 @@ func OpenStore(name string) (*ScriptureStore, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = json.Unmarshal(buf, *s)
|
||||
err = json.Unmarshal(buf, s)
|
||||
return s, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue