Documentation : Comment implicit truncation

This commit is contained in:
Gabriel Ravier 2019-11-05 17:06:06 +01:00
parent fa304081fe
commit 073a15b41b
2 changed files with 4 additions and 0 deletions

View file

@ -1081,6 +1081,8 @@ void ActNpc088(NPCHAR *npc)
case 10:
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)
deg = 0x88;
else

View file

@ -1291,6 +1291,8 @@ void ActNpc268(NPCHAR *npc)
case 51:
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)
deg = 0x88;
else