Fix crash due to incorrect loop bounds in add-spatter.

This caused a buffer overrun bug if an ADD_SPATTER
reaction had any non-improvement outputs.
develop
Alexander Gavrilov 2013-08-22 11:22:18 +04:00
parent df2e04db26
commit 70a2ab9141
1 changed files with 1 additions and 1 deletions

@ -378,7 +378,7 @@ static bool find_reactions(color_ostream &out)
parse_product(out, out_prod.back(), it->second.react, itprod); parse_product(out, out_prod.back(), it->second.react, itprod);
} }
for (size_t i = 0; i < prod.size(); i++) for (size_t i = 0; i < out_prod.size(); i++)
{ {
if (out_prod[i].isValid()) if (out_prod[i].isValid())
products[out_prod[i].product] = &out_prod[i]; products[out_prod[i].product] = &out_prod[i];