Commit 272ef5a6 authored by BlackEagle's avatar BlackEagle

atlas post-processor on 32bit uint32 overflows int

post-processor/atlas/util.go:16: constant 4294967295 overflows int
Signed-off-by: default avatarBlackEagle <ike.devolder@gmail.com>
parent bf4012d0
......@@ -11,13 +11,14 @@ import (
//
// This function just uses brute force instead of a more optimized algorithm.
func longestCommonPrefix(vs []string) string {
var length int64
// Find the shortest string
var shortest string
length := math.MaxUint32
length = math.MaxUint32
for _, v := range vs {
if len(v) < length {
if int64(len(v)) < length {
shortest = v
length = len(v)
length = int64(len(v))
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment