Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
cbbd8447
Commit
cbbd8447
authored
Oct 22, 2012
by
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
dlib/bsp/bsp.h
dlib/bsp/bsp.h
+4
-0
No files found.
dlib/bsp/bsp.h
View file @
cbbd8447
...
@@ -453,6 +453,10 @@ namespace dlib
...
@@ -453,6 +453,10 @@ namespace dlib
{
{
std
::
istringstream
sin
(
*
temp
);
std
::
istringstream
sin
(
*
temp
);
deserialize
(
item
,
sin
);
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
;
return
true
;
}
}
else
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment