Fix some tests.
[lightning.git] / taglib.go
index 36e1d2775d6b8372e63ef0bddd065dbdc580fc1d..e4b25c17de2461beac6321f767e4dbb8331ff4cf 100644 (file)
--- a/taglib.go
+++ b/taglib.go
@@ -64,18 +64,22 @@ func (taglib *tagLibrary) FindAll(in *bufio.Reader, passthrough io.Writer, fn fu
                }
 
                if passthrough != nil {
+                       if base >= 'A' && base <= 'Z' {
+                               // lowercase for passthrough
+                               base += 'a' - 'A'
+                       }
                        _, err = passthrough.Write([]byte{base})
                        if err != nil {
                                return err
                        }
                }
+               offset++
                if !isbase[int(base)] {
                        // 'N' or various other chars meaning exact
                        // base not known
                        window = window[:0]
                        continue
                }
-               offset++
                window = append(window, base)
                if len(window) == cap(window) {
                        copy(window, window[len(window)-taglib.keylen:])