]> git.donarmstrong.com Git - samtools.git/commitdiff
Fixed a typo in read_samples
authorPetr Danecek <pd3@sanger.ac.uk>
Tue, 4 Jan 2011 11:55:56 +0000 (11:55 +0000)
committerPetr Danecek <pd3@sanger.ac.uk>
Tue, 4 Jan 2011 11:55:56 +0000 (11:55 +0000)
bcftools/call1.c

index 0991fce6f9b18905e5ad6f72929f0477d1b8482a..809fe344bfd0a7abf822b82db3670c25ed47689c 100644 (file)
@@ -214,7 +214,7 @@ static char **read_samples(const char *fn, int *_n)
        while (ks_getuntil(ks, 0, &s, &dret) >= 0) {
                if (max == n) {
                        max = max? max<<1 : 4;
-                       sam = realloc(sam, sizeof(void*));
+                       sam = realloc(sam, sizeof(void*)*max);
                }
                sam[n++] = strdup(s.s);
        }