diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-07-01 12:45:05 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-07-01 12:45:05 +0200 |
commit | 3866ed99648c59940f39d21e6746cbb7dc64bba6 (patch) | |
tree | d9989ff21d455dba5c0516af5bef6df8b58a37f2 /src | |
parent | 5981641a3715468f60518a2f4fef45e5848a8d1e (diff) |
XDR: Fix string alignment
Diffstat (limited to 'src')
-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() |