mirror of
https://github.com/weaveworks/scope.git
synced 2026-02-14 18:09:59 +00:00
Blank out value on LatestMap decode insert
Fixing a rare case that came up in a test. In order for this to cause a problem, the data being decoded has to have entries out of order, and have a value that is nil or omitted.
This commit is contained in:
@@ -143,6 +143,7 @@ function generate_latest_map() {
|
||||
if i == len(*m) || (*m)[i].key != key {
|
||||
*m = append(*m, ${entry_type}{})
|
||||
copy((*m)[i+1:], (*m)[i:])
|
||||
(*m)[i] = ${entry_type}{}
|
||||
}
|
||||
return i
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user