Commit 1401f910 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Division by zero is undefined

parent b9506442
......@@ -192,7 +192,8 @@ do_once_cb(void *priv, const struct VSC_point * const pt)
printf("%*.*s", op->pad - i, op->pad - i, "");
if (pt->desc->semantics == 'c')
printf("%12ju %12.2f %s\n",
(uintmax_t)val, val / op->up, pt->desc->sdesc);
(uintmax_t)val, op->up ? val / op->up : 0,
pt->desc->sdesc);
else
printf("%12ju %12s %s\n",
(uintmax_t)val, ". ", pt->desc->sdesc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment