template.c: fix possible division by zero
This commit is contained in:
parent
c81054b6f6
commit
ba855735fb
@ -195,7 +195,13 @@ main(void)
|
|||||||
(uintmax_t) (sizeof(SAMPLE_TYPE) / sizeof(uint8_t)));
|
(uintmax_t) (sizeof(SAMPLE_TYPE) / sizeof(uint8_t)));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
const size_t MAX = (PRODUCT + (BLOCK_SIZE - 1)) / BLOCK_SIZE;
|
const size_t MAX =
|
||||||
|
#if BLOCK_SIZE > 0
|
||||||
|
(PRODUCT + (BLOCK_SIZE - 1)) / BLOCK_SIZE
|
||||||
|
#else
|
||||||
|
0
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
|
||||||
size_t w = 0;
|
size_t w = 0;
|
||||||
for (size_t seq = 0; seq < MAX; seq++) {
|
for (size_t seq = 0; seq < MAX; seq++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user