Skip to content

Commit

Permalink
Fix loop conditional in NCZ_filter_finalize
Browse files Browse the repository at this point in the history
`loaded_plugins_max` is *not* the total number of loaded plugins, but
the max ID, and defaults to `-1`. This clashes with the change of the
index to `size_t`
  • Loading branch information
ZedThree committed Mar 12, 2024
1 parent 3537781 commit f8da95a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libnczarr/zfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ NCZ_filter_finalize(void)
#ifdef DEBUGL
fprintf(stderr,">>> DEBUGL: finalize reclaim:\n");
#endif
for(i=0;i<=loaded_plugins_max;i++) {
for(i=0; i < (loaded_plugins_max + 1); i++) {
if(loaded_plugins[i]) {
NCZ_unload_plugin(loaded_plugins[i]);
loaded_plugins[i] = NULL;
Expand Down

0 comments on commit f8da95a

Please sign in to comment.