summaryrefslogtreecommitdiff
path: root/src/ghost.c
diff options
context:
space:
mode:
authorPikalaxALT <PikalaxALT@users.noreply.github.com>2019-07-20 12:11:46 -0400
committerGitHub <noreply@github.com>2019-07-20 12:11:46 -0400
commit4d5c1ca03b4e7db3c44c71afaa01b1549a282a19 (patch)
treeec2e9ec5f3e4a6d8523e80ab58e6c9c296fbc05c /src/ghost.c
parent3f762629e830c0cad66c4efeea5b918bdf4cce20 (diff)
parent6edacdee36d31b2df69559f28a33b8d9e958bf5e (diff)
Merge pull request #732 from PikalaxALT/modern_gcc
Modernize code for compatibility with later releases of GCC
Diffstat (limited to 'src/ghost.c')
-rw-r--r--src/ghost.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ghost.c b/src/ghost.c
index 97b86aa76..dd29fb7ca 100644
--- a/src/ghost.c
+++ b/src/ghost.c
@@ -1148,7 +1148,8 @@ static void sub_8112B78(struct Sprite *sprite)
if (++coeffB > 16)
coeffB = 16;
- if (--(s16)coeffA < 0)
+ --coeffA;
+ if ((s16)coeffA < 0)
coeffA = 0;
SetGpuReg(REG_OFFSET_BLDALPHA, BLDALPHA_BLEND(coeffA, coeffB));