Commit 4b1eef3d authored by Davis King's avatar Davis King

Added a missing check for division by zero.

--HG--
extra : convert_revision : svn%3Afdd8eb12-d10e-0410-9acb-85c331704f74/trunk%403389
parent b02ee05a
...@@ -212,7 +212,9 @@ namespace dlib ...@@ -212,7 +212,9 @@ namespace dlib
} }
// return the length normalized descriptor // return the length normalized descriptor
des = des/length(des); const double len = length(des);
if (len != 0)
des = des/len;
} }
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
......
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