summaryrefslogtreecommitdiff
path: root/src/elements/phot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/elements/phot.c')
-rw-r--r--src/elements/phot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/elements/phot.c b/src/elements/phot.c
index f999753..7a9d4f2 100644
--- a/src/elements/phot.c
+++ b/src/elements/phot.c
@@ -64,11 +64,11 @@ int graphics_PHOT(GRAPHICS_FUNC_ARGS)
int x = 0;
*colr = *colg = *colb = 0;
for (x=0; x<12; x++) {
- *colr += (parts[i].ctype >> (x+18)) & 1;
- *colb += (parts[i].ctype >> x) & 1;
+ *colr += (cpart->ctype >> (x+18)) & 1;
+ *colb += (cpart->ctype >> x) & 1;
}
for (x=0; x<12; x++)
- *colg += (parts[i].ctype >> (x+9)) & 1;
+ *colg += (cpart->ctype >> (x+9)) & 1;
x = 624/(*colr+*colg+*colb+1);
*colr *= x;
*colg *= x;