aboutsummaryrefslogtreecommitdiff
path: root/config/menu.go
diff options
context:
space:
mode:
authorJulien Dessaux2021-01-12 15:56:28 +0100
committerJulien Dessaux2021-01-12 15:56:28 +0100
commitd4b3c2c4ce6a175a07a67a5491485efb93281257 (patch)
tree8590b2592dbd14864011aa60622e47f718250252 /config/menu.go
parentUpdated menu tests to account properly for duplicate keys (diff)
downloadshell-game-launcher-d4b3c2c4ce6a175a07a67a5491485efb93281257.tar.gz
shell-game-launcher-d4b3c2c4ce6a175a07a67a5491485efb93281257.tar.bz2
shell-game-launcher-d4b3c2c4ce6a175a07a67a5491485efb93281257.zip
Fixed invalid handling of menu offsets
Diffstat (limited to 'config/menu.go')
-rw-r--r--config/menu.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/menu.go b/config/menu.go
index a442036..f405ec5 100644
--- a/config/menu.go
+++ b/config/menu.go
@@ -39,11 +39,11 @@ func (m *Menu) validate(name string) error {
}
// Banner is just any string, nothing to validate
// XOffset
- if m.XOffset <= 0 {
+ if m.XOffset < 0 {
return errors.New("XOffset must be a positive integer")
}
// YOffset
- if m.YOffset <= 0 {
+ if m.YOffset < 0 {
return errors.New("YOffset must be a positive integer")
}
// MenuEntries