diff --git a/encoding2.c b/encoding2.c index d1c4475..ea8f200 100644 --- a/encoding2.c +++ b/encoding2.c @@ -113,6 +113,11 @@ static void parse_struct(const char **type, type_parser callback, void *context) inline static void round_up(size_t *v, size_t b) { + if (0 == b) + { + return; + } + if (*v % b) { *v += b - (*v % b);