Skip to content

Commit d2d6485

Browse files
committed
fixed a type cast error in DEBUG clause in spec-adjust-hl
1 parent 8de4416 commit d2d6485

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/higher-level/spec-adjust-hl.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -842,17 +842,17 @@ double pred, wpred[_SPECHOMO_N_DST_], wsum;
842842

843843

844844
#ifdef FORCE_DEBUG
845-
if (p==0){
846-
printf("using %d regressors\n", n_cluster);
847-
for (b=0; b<_SPECHOMO_N_DST_; b++) printf("reflectance before: %04d ",
848-
ard.dat[b_dst[b]][p]); printf("\n");
849-
for (b=0; b<_SPECHOMO_N_DST_; b++) printf("reflectance after: %04d ",
850-
wpred[b] / wsum); printf("\n");
851-
}
845+
printf("using %d regressors\n", n_cluster);
846+
printf("reflectance before:");
847+
for (b=0; b<_SPECHOMO_N_DST_; b++) printf(" %04d", ard.dat[b_dst[b]][p]);
848+
printf("\n");
849+
printf("reflectance after: ");
850+
for (b=0; b<_SPECHOMO_N_DST_; b++) printf(" %04d", (short)(wpred[b] / wsum));
851+
printf("\n");
852852
//ard.dat[0][p] = n_cluster;
853853
#endif
854854

855-
for (b=0; b <_SPECHOMO_N_DST_; b++) ard.dat[b_dst[b]][p] = wpred[b] / wsum;
855+
for (b=0; b <_SPECHOMO_N_DST_; b++) ard.dat[b_dst[b]][p] = (short)(wpred[b] / wsum);
856856

857857
}
858858

0 commit comments

Comments
 (0)