diff options
author | Olivier Gayot <og@satcom1.com> | 2017-11-19 11:50:16 +0100 |
---|---|---|
committer | Olivier Gayot <og@satcom1.com> | 2017-11-19 16:15:32 +0100 |
commit | 6843dc1272e56e91234deab486781c711436031e (patch) | |
tree | 25c5daa396966b635a6025ea6a607ce46adba2d7 /number.h | |
parent | 615b8a00aedb3363b4749f706d6df51846b743ac (diff) |
Fixed addition with operands of different sizes
When two numbers (i.e. their _operands list) had different sizes, their
addition was resulting in undefined behaviour because, at some point in
the computation, we were dereferencing the iterator of the shortest
number (and the iterator was _operands.cend()).
Fixed by virtually "padding" the shortest number with zeros.
Signed-off-by: Olivier Gayot <og@satcom1.com>
Diffstat (limited to 'number.h')
0 files changed, 0 insertions, 0 deletions