Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fixed zapbirds bug #18

Merged
merged 2 commits into from

2 participants

@pscholz

Hi Scott. Here's the pull request for the small fix in zapbirds. My master branch also includes some commits from Kevin's implementation of zerodming. There is also a commit where I found 2 free() calls in explorefft.c that should be vect_free() calls. You probably just want to cherry pick the zapbird fix commit and the explorefft vect_free fix commit.

Paul

@scottransom
Owner
@pscholz
@scottransom scottransom merged commit 0a497f6 into scottransom:master
@scottransom
Owner

Thanks for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 31, 2012
  1. Fixed bug where zapbirds was trying to zap 0 bins.

    Paul Scholz authored
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 3 deletions.
  1. +2 −2 src/explorefft.c
  2. +1 −1  src/zapbirds.c
View
4 src/explorefft.c
@@ -193,7 +193,7 @@ static double plot_fftview(fftview * fv, float maxpow, float charhgt,
cpgdraw(freqs[ii], fv->powers[ii]);
}
}
- free(freqs);
+ vect_free(freqs);
cpgmtxt("L", 2.5, 0.5, 0.5, "Normalized Power");
cpgebuf();
cpgunsa();
@@ -240,7 +240,7 @@ static fftview *get_fftview(double centerr, int zoomlevel, fftpart * fp)
fv->powers[ii] = POWER(interp[ii].r, interp[ii].i) * norm_const;
}
}
- free(interp);
+ vect_free(interp);
} else { /* Down-sampled power spectrum */
int jj, powindex, normindex, binstocombine;
float *tmprawpwrs, maxpow;
View
2  src/zapbirds.c
@@ -292,7 +292,7 @@ int main(int argc, char *argv[])
fftfile = chkfopen(cmd->argv[0], "rb+");
for (ii = 0; ii < numbirds; ii++) {
- if (bird_lobins[ii] >= hibin)
+ if (bird_lobins[ii] >= hibin - 1)
break;
if (bird_hibins[ii] >= hibin)
bird_hibins[ii] = hibin - 1;
Something went wrong with that request. Please try again.