Commit 16aada08 authored by Davis King's avatar Davis King

Fixed a bug in sparse_to_dense() which I just introduced a few

commits ago.
parent c9a1aa4b
......@@ -659,7 +659,7 @@ namespace dlib
for (typename sparse_vector_type::const_iterator j = vect.begin(); j != vect.end(); ++j)
{
if (result.size() < (long)(j->first))
if ((long)(j->first) < result.size())
{
result(j->first) += j->second;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment