summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rfc4251.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/rfc4251.h b/rfc4251.h
index 3c291a2..35f97fb 100644
--- a/rfc4251.h
+++ b/rfc4251.h
@@ -135,8 +135,8 @@ inline rfc4251uint64::rfc4251uint64 (uint64_t v) {
inline rfc4251uint64::operator uint64_t () const {
uint64_t ret{0};
for (uint_fast8_t i{0}; i < 8; ++i) {
- ret |= buf[i];
ret <<= 8;
+ ret |= static_cast<uint8_t>(buf[i]);
}
return ret;
}