mirror of https://github.com/tidwall/tile38.git
Hotfix for previous commit
This commit is contained in:
parent
67abcefd25
commit
b606f23bd0
|
@ -399,14 +399,14 @@ func (sw *scanWriter) writeObject(opts ScanWriterParams) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if len(sw.farr) > 0 {
|
} else if len(sw.farr) > 0 {
|
||||||
fvs := orderFields(sw.fmap, sw.farr, opts.fields)
|
|
||||||
jsfields = `,"fields":[`
|
jsfields = `,"fields":[`
|
||||||
for i, fv := range fvs {
|
for i, name := range sw.farr {
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
jsfields += `,`
|
jsfields += `,`
|
||||||
}
|
}
|
||||||
if len(opts.fields) > i {
|
j := sw.fmap[name]
|
||||||
jsfields += strconv.FormatFloat(fv.value, 'f', -1, 64)
|
if j < len(opts.fields) {
|
||||||
|
jsfields += strconv.FormatFloat(opts.fields[j], 'f', -1, 64)
|
||||||
} else {
|
} else {
|
||||||
jsfields += "0"
|
jsfields += "0"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue