macro: account for negative values in DECIMAL_STR_WIDTH()
authorFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 13 Mar 2022 13:45:03 +0000 (14:45 +0100)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Sun, 13 Mar 2022 18:25:18 +0000 (19:25 +0100)
commite3dd9ea8ea4510221f73071ad30ee657ca77565d
treefa14ad599723c42b8f1eb86ec69ee9079455649d
parent34c4dff4d2e592e90dd9833fee4ce1ac981e8ea9
macro: account for negative values in DECIMAL_STR_WIDTH()

With negative numbers we wouldn't account for the minus sign, thus
returning a string with one character too short, triggering buffer
overflows in certain situations.
src/basic/macro.h