aboutsummaryrefslogtreecommitdiff
path: root/sibs/SafeDeserializer.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'sibs/SafeDeserializer.hpp')
-rw-r--r--sibs/SafeDeserializer.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/sibs/SafeDeserializer.hpp b/sibs/SafeDeserializer.hpp
index 0110920..763140a 100644
--- a/sibs/SafeDeserializer.hpp
+++ b/sibs/SafeDeserializer.hpp
@@ -97,6 +97,13 @@ namespace sibs
{
return size;
}
+
+ void skip(usize bytesToSkip)
+ {
+ bytesToSkip = bytesToSkip < size ? bytesToSkip : size;
+ size -= bytesToSkip;
+ data += bytesToSkip;
+ }
private:
void verifyExtractSize(usize typeSize) const
{