Imported Upstream version 0.1.12a
[samtools.git] / 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;
        }