Blend format: fix crash when trying to load a data block of missing type.
This commit is contained in:
parent
1abd60e48f
commit
f03d1929cb
|
@ -122,7 +122,7 @@ proc hash*(n: FNode): Hash =
|
|||
|
||||
const BASIC_TYPE_LENGTHS = [1, 1, 2, 2, 4, 4, 4, 4, 8, 8, 8, 0, 1]
|
||||
|
||||
template `[]`*(blocks: NamedBlocks, s: string): untyped = blocks[[s[0],s[1]]]
|
||||
template `[]`*(blocks: NamedBlocks, s: string): untyped = blocks.getOrDefault([s[0],s[1]])
|
||||
# iterator items*(s: NamedBlocks): seq[FNode] {.borrow.}
|
||||
# iterator pairs*(s: NamedBlocks): (array[2, char], seq[FNode]) {.borrow.}
|
||||
|
||||
|
|
Loading…
Reference in a new issue