]> git.donarmstrong.com Git - samtools.git/commitdiff
a possible fix to DP4=0,0,0,0; have not tested, but should have no side-effect
authorHeng Li <lh3@live.co.uk>
Thu, 2 Dec 2010 20:55:06 +0000 (20:55 +0000)
committerHeng Li <lh3@live.co.uk>
Thu, 2 Dec 2010 20:55:06 +0000 (20:55 +0000)
bcftools/call1.c

index 5e4fc9fbc267928260c678ef3ce62f942fcebc7b..f293a6cf94e611a9f9ff50d83ab1b69c660e15d7 100644 (file)
@@ -129,7 +129,7 @@ static int test16(bcf1_t *b, anno16_t *a)
        if ((p = strstr(b->info, "I16=")) == 0) return -1;
        p += 4;
        for (i = 0; i < 16; ++i) {
-               anno[i] = strtol(p, &p, 10);
+               errno = 0; anno[i] = strtol(p, &p, 10);
                if (anno[i] == 0 && (errno == EINVAL || errno == ERANGE)) return -2;
                ++p;
        }