Fix prepare_modify() when splitting a max-sized block
commit5c05850c2a5f3ca68be6929c1cfe9f982e9911e9
authorPetr Tesarik <petr@tesarici.cz>
Fri, 18 May 2018 09:15:53 +0000 (18 11:15 +0200)
committerPetr Tesarik <petr@tesarici.cz>
Fri, 18 May 2018 09:36:01 +0000 (18 11:36 +0200)
tree903eec6cdf7a2dc0eecec4ee9c59860268dd7999
parent783900d70d0a1338f4ff0dc8ec024b2af8410e67
Fix prepare_modify() when splitting a max-sized block

Since hed_block_size() returns zero for a max-sized block, it is
necessary to subtract one in a few places (and make sure that it
cannot be in fact a zero-sized block).

Signed-off-by: Petr Tesarik <petr@tesarici.cz>
libhed/file.c