DiffFieldReader: filter all '#' fields from sets

Now that readMap filters out '#' fields, when maps are nested in sets,
we exposed a related bug where a set was iterating over nested maps and
expected the '#' key to be present in those nested maps.

By skipping _all_ count fields when iterating over set keys, all is
right with the world again.
This commit is contained in:
Paul Hinze 2015-02-04 09:25:45 -06:00
parent 219aa3e788
commit 4e8e3dad86
1 changed files with 2 additions and 2 deletions

View File

@ -153,8 +153,8 @@ func (r *DiffFieldReader) readSet(
if !strings.HasPrefix(k, prefix) {
continue
}
if strings.HasPrefix(k, prefix+"#") {
// Ignore the count field
if strings.HasSuffix(k, "#") {
// Ignore any count field
continue
}