Fixes an out of bound panic in SPARQL evaluation

pull/100/head
Tpt 4 years ago
parent bdeb73868c
commit 8671fb6060
  1. 2
      lib/src/sparql/eval.rs

@ -2682,7 +2682,7 @@ fn get_triple_template_value<I: StrId>(
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