diff options
-rw-r--r-- | src/lib/xdr.cc | 4 | ||||
-rw-r--r-- | src/lib/xdr16.cc | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/xdr.cc b/src/lib/xdr.cc index 10d265f..b44471f 100644 --- a/src/lib/xdr.cc +++ b/src/lib/xdr.cc @@ -83,7 +83,7 @@ void XDRWriter::put(char const *data) { *buffer++ = 0; } - pos += i; + pos += i - 1; } template <uint32_t TSize> @@ -102,7 +102,7 @@ void XDRWriter::put(char const (&data)[TSize]) { *buffer++ = 0; } - pos += i; + pos += i - 1; } uint32_t XDRReader::get_uint32() diff --git a/src/lib/xdr16.cc b/src/lib/xdr16.cc index a9442bb..b1fb7ca 100644 --- a/src/lib/xdr16.cc +++ b/src/lib/xdr16.cc @@ -97,7 +97,7 @@ void XDRWriter::put(char const *data) { *buffer++ = 0; } - pos += i; + pos += i - 1; } template <uint16_t TSize> @@ -116,7 +116,7 @@ void XDRWriter::put(char const (&data)[TSize]) { *buffer++ = 0; } - pos += i; + pos += i - 1; } uint16_t XDRReader::get_uint16() |