mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
Fixed a bug in sparse_to_dense() which I just introduced a few
commits ago.
This commit is contained in:
parent
c9a1aa4b71
commit
16aada0843
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user