mirror of
https://github.com/garraflavatra/go-fmp.git
synced 2025-07-17 03:34:05 +00:00
Return nil if dict path does not exist
This commit is contained in:
@ -47,7 +47,7 @@ func (dict *FmpDict) get(path []uint64) *FmpDictEntry {
|
||||
for i, key := range path {
|
||||
_, ok := (*dict)[key]
|
||||
if !ok {
|
||||
(*dict)[key] = &FmpDictEntry{Children: &FmpDict{}}
|
||||
return nil
|
||||
}
|
||||
|
||||
if i == len(path)-1 {
|
||||
|
Reference in New Issue
Block a user