提交 46263fc1 编写于 作者: M Mark VanderVoord

Get the 2's compliment of the unsigned int `number` when printing results...

Get the 2's compliment of the unsigned int `number` when printing results without relying on problematic recasting of a negated int. (see #439)
上级 2939c420
......@@ -327,7 +327,7 @@ void UnityPrintNumber(const UNITY_INT number_to_print)
{
/* A negative number, including MIN negative */
UNITY_OUTPUT_CHAR('-');
number = (UNITY_UINT)-number_to_print;
number = (~number) + 1;
}
UnityPrintNumberUnsigned(number);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册