add assert to catch potential bug

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-04-17 12:11:40 -07:00
committed by Daniel D’Aquino
parent 690e1347e0
commit 919f644cba

View File

@@ -185,6 +185,7 @@ struct nostr_bech32 *ndb_bech32_block(struct ndb_block *block) {
// total size including padding // total size including padding
size_t ndb_blocks_total_size(struct ndb_blocks *blocks) { size_t ndb_blocks_total_size(struct ndb_blocks *blocks) {
assert(blocks->total_size < 1000000);
return blocks->total_size; return blocks->total_size;
} }