Skip to content

Commit 32d1c45

Browse files
committed
fix: fixed c code for agg
1 parent d24f13d commit 32d1c45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hydrodiy/data/c_dutils.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ int c_aggregate(int nval, int operator, int maxnan, int * aggindex,
7171
agg += inp;
7272
}
7373
else if (operator == 2){
74-
agg = max(agg, inp);
74+
agg = inp > agg ? inp : agg;
7575
}
7676
else if (operator == 3){
7777
agg = inp;

0 commit comments

Comments
 (0)