From fa898e883efe62fb885e7966f6151915721458f9 Mon Sep 17 00:00:00 2001 From: Alexandre Pauzies Date: Mon, 13 Nov 2017 19:45:16 -0500 Subject: [PATCH] key: keys should not consider themselves for recursion read (#130) --- key.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/key.go b/key.go index ab566c2..d3eac47 100644 --- a/key.go +++ b/key.go @@ -114,7 +114,7 @@ func (k *Key) transformValue(val string) string { // Search in the same section. nk, err := k.s.GetKey(noption) - if err != nil { + if err != nil || k == nk { // Search again in default section. nk, _ = k.s.f.Section("").GetKey(noption) }