Skip to content

Commit 97619a8

Browse files
committed
fixup! feat(cardano): Message signing
1 parent 9ceecd0 commit 97619a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/apps/cardano/helpers/chunks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
def _get_chunks_count(size: int) -> int:
2626
"""Integer-only version of `ceil(size / MAX_CHUNK_SIZE)`."""
2727
assert size >= 0
28-
return 0 if size == 0 else (size - 1) // MAX_CHUNK_SIZE + 1
28+
return (size + MAX_CHUNK_SIZE - 1) // MAX_CHUNK_SIZE
2929

3030

3131
def _validate_chunk(

0 commit comments

Comments
 (0)