From 8d1cd4d2523d2123e0cdfc1bef579247706e4e09 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Thu, 23 Jul 2020 19:24:22 -0400 Subject: [PATCH] Fix double-indirection bug in logging IDs (#12294) (#12308) This PR fixes a bug in log.NewColoredIDValue() which led to a double indirection and incorrect IDs being printed out. Signed-off-by: Andrew Thornton Co-authored-by: zeripath --- modules/log/colors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/log/colors.go b/modules/log/colors.go index 282d0c919..d8e577673 100644 --- a/modules/log/colors.go +++ b/modules/log/colors.go @@ -355,7 +355,7 @@ func NewColoredValueBytes(value interface{}, colorBytes *[]byte) *ColoredValue { // The Value will be colored with FgCyan // If a ColoredValue is provided it is not changed func NewColoredIDValue(value interface{}) *ColoredValue { - return NewColoredValueBytes(&value, &fgCyanBytes) + return NewColoredValueBytes(value, &fgCyanBytes) } // Format will format the provided value and protect against ANSI color spoofing within the value