diff --git a/src/loaders/blend_format.nim b/src/loaders/blend_format.nim index 9e9576e..14a31ef 100644 --- a/src/loaders/blend_format.nim +++ b/src/loaders/blend_format.nim @@ -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.}