Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
packer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kristopher Ruzic
packer
Commits
ef9cceca
Commit
ef9cceca
authored
Dec 11, 2014
by
Seth Vargo
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1748 from BlackIkeEagle/constant-4294967295-overflows-int
atlas post-processor on 32bit uint32 overflows int
parents
0e4d7613
272ef5a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
post-processor/atlas/util.go
post-processor/atlas/util.go
+4
-3
No files found.
post-processor/atlas/util.go
View file @
ef9cceca
...
...
@@ -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
)
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment