Fixes an out of bound panic in SPARQL evaluation

pull/171/head
Tpt 4 years ago
parent 16194bbaa4
commit b4080a7ce1
  1. 2
      lib/src/sparql/eval.rs

@ -2699,7 +2699,7 @@ fn get_triple_template_value<'a>(
TripleTemplateValue::Variable(v) => tuple.get(*v), TripleTemplateValue::Variable(v) => tuple.get(*v),
TripleTemplateValue::BlankNode(id) => { TripleTemplateValue::BlankNode(id) => {
if *id >= bnodes.len() { if *id >= bnodes.len() {
bnodes.resize_with(*id, new_bnode) bnodes.resize_with(*id + 1, new_bnode)
} }
Some(&bnodes[*id]) Some(&bnodes[*id])
} }

Loading…
Cancel
Save