2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-30 00:33:57 +00:00

Merge pull request #597 from restic/fix-panic-596

Fix panic for debug.Log() with empty string
This commit is contained in:
Alexander Neumann 2016-08-29 17:13:37 +02:00
commit 24385ff56e

View File

@ -146,7 +146,7 @@ func Log(tag string, f string, args ...interface{}) {
current := time.Now()
opts.last[process{tag, goroutine}] = current
if f[len(f)-1] != '\n' {
if len(f) == 0 || f[len(f)-1] != '\n' {
f += "\n"
}