Documentation : Comment implicit truncation
This commit is contained in:
parent
fa304081fe
commit
073a15b41b
2 changed files with 4 additions and 0 deletions
|
@ -1081,6 +1081,8 @@ void ActNpc088(NPCHAR *npc)
|
||||||
case 10:
|
case 10:
|
||||||
if (++npc->act_wait > 100 && npc->act_wait % 6 == 1)
|
if (++npc->act_wait > 100 && npc->act_wait % 6 == 1)
|
||||||
{
|
{
|
||||||
|
// The range of unsigned char is [0, 255] so these two values are implicitly truncated (Might be UB ?)
|
||||||
|
// TODO : Investigate on whether this is erroneous
|
||||||
if (npc->direct == 0)
|
if (npc->direct == 0)
|
||||||
deg = 0x88;
|
deg = 0x88;
|
||||||
else
|
else
|
||||||
|
|
|
@ -1291,6 +1291,8 @@ void ActNpc268(NPCHAR *npc)
|
||||||
case 51:
|
case 51:
|
||||||
if (++npc->act_wait > 30 && npc->act_wait % 4 == 1)
|
if (++npc->act_wait > 30 && npc->act_wait % 4 == 1)
|
||||||
{
|
{
|
||||||
|
// The range of unsigned char is [0, 255] so these two values are implicitly truncated (Might be UB ?)
|
||||||
|
// TODO : Investigate on whether this is erroneous
|
||||||
if (npc->direct == 0)
|
if (npc->direct == 0)
|
||||||
deg = 0x88;
|
deg = 0x88;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue