ostap / comp

a tool for querying files in various formats
MIT License
43 stars 2 forks source link

nil pointer dereference for empty results when using CLI #21

Closed julochrobak closed 11 years ago

julochrobak commented 11 years ago
$ echo '[1]' | bin/comp -t json '[ i | i <- in, i > 1]'
2013/09/26 10:52:43.026657 store.go:85: stored in (recs 1)
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x48 pc=0xdc95]

goroutine 1 [running]:
main.Command(0x7fff5fbffad1, 0x18, 0x7fff5fbffacc, 0x4, 0x24, ...)
    /Users/julo/comp/src/comp/main.go:33 +0x355
main.main()
    /Users/julo/comp/src/comp/main.go:104 +0x1ea

goroutine 2 [syscall]:
ostap commented 11 years ago

strictly speaking the result should be [] and not "".