Commit a6376b40 authored by Mouse's avatar Mouse

Fix PER decoding of larger integer values

parent dcf963c0
......@@ -294,7 +294,7 @@ per_imax_range_unrebase(uintmax_t inp, intmax_t lb, intmax_t ub, intmax_t *outp)
}
if(inp <= INTMAX_MAX) {
*outp = (long)inp + lb;
*outp = (intmax_t)inp + lb;
} else {
*outp = (lb + INTMAX_MAX + 1) + (intmax_t)((inp - INTMAX_MAX) - 1);
}
......
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