Array logic was stupid; incorrect marshal dereference.

This commit is contained in:
Benjamin A. Shelton 2026-09-11 15:20:13 -06:00
commit 14d26524bd
Signed by: zancarius
GPG key ID: 8BD42DBD6C337E01

View file

@ -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
}