"csrc/vscode:/vscode.git/clone" did not exist on "e549be607c0f85fc3eb91b3ce977f1d063d65f3c"
Commit cbbd8447 authored by Davis King's avatar Davis King
Browse files

Added more validation code to the BSP tools. Now they will do a little more

to detect invalid serialization.
parent 23d1c1fa
......@@ -453,6 +453,10 @@ namespace dlib
{
std::istringstream sin(*temp);
deserialize(item, sin);
if (sin.peek() != EOF)
throw serialization_error("deserialize() did not consume all bytes produced by serialize(). "
"This probably means you are calling a receive method with a different type "
"of object than the one which was sent.");
return true;
}
else
......
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