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

commits ago.
This commit is contained in:
Davis King 2012-05-05 13:43:45 -04:00
parent c9a1aa4b71
commit 16aada0843

View File

@ -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;
}