diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-16 18:48:40 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-06-14 08:47:23 +0000 |
| commit | 1387549e905fc206426d3099b069bd28df0aad71 (patch) | |
| tree | 8fbb5700c5a868febfa934c6c280f80d5315a7a4 /src/ringct | |
| parent | a00cabd4f343cc10a1ccf6713c7ee2c9fa1496ea (diff) | |
| download | monzero-core-1387549e905fc206426d3099b069bd28df0aad71.tar.gz monzero-core-1387549e905fc206426d3099b069bd28df0aad71.tar.xz monzero-core-1387549e905fc206426d3099b069bd28df0aad71.zip | |
serialization: check stream good flag at the end
just in case
Diffstat (limited to 'src/ringct')
| -rw-r--r-- | src/ringct/rctTypes.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ringct/rctTypes.h b/src/ringct/rctTypes.h index e5413f1dc..f8729b872 100644 --- a/src/ringct/rctTypes.h +++ b/src/ringct/rctTypes.h @@ -252,7 +252,7 @@ namespace rct { { FIELD(type) if (type == RCTTypeNull) - return true; + return ar.stream().good(); if (type != RCTTypeFull && type != RCTTypeSimple && type != RCTTypeBulletproof && type != RCTTypeBulletproof2) return false; VARINT_FIELD(txnFee) @@ -312,7 +312,7 @@ namespace rct { ar.delimit_array(); } ar.end_array(); - return true; + return ar.stream().good(); } }; struct rctSigPrunable { @@ -325,7 +325,7 @@ namespace rct { bool serialize_rctsig_prunable(Archive<W> &ar, uint8_t type, size_t inputs, size_t outputs, size_t mixin) { if (type == RCTTypeNull) - return true; + return ar.stream().good(); if (type != RCTTypeFull && type != RCTTypeSimple && type != RCTTypeBulletproof && type != RCTTypeBulletproof2) return false; if (type == RCTTypeBulletproof || type == RCTTypeBulletproof2) @@ -429,7 +429,7 @@ namespace rct { } ar.end_array(); } - return true; + return ar.stream().good(); } }; |
