X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=samtools.git;a=blobdiff_plain;f=bam_import.c;h=29516c92ff42593313caf2833c38213d62ebdc52;hp=8c24692fe2d1b5c080c7eb7057b2c459f1bc9751;hb=2347ad62090e036841008e054c234868e21f7a80;hpb=b7c06ea4740153b8f27c7c2374131dbd607b6113 diff --git a/bam_import.c b/bam_import.c index 8c24692..29516c9 100644 --- a/bam_import.c +++ b/bam_import.c @@ -445,7 +445,7 @@ int sam_read1(tamFile fp, bam_header_t *header, bam1_t *b) else if (str->s[5] == 'S') while (p < str->s + str->l) ((uint16_t*)s)[k++] = (uint16_t)strtol(p, &p, 0), ++p; else if (str->s[5] == 'i') while (p < str->s + str->l) ((int32_t*)s)[k++] = (int32_t)strtol(p, &p, 0), ++p; else if (str->s[5] == 'I') while (p < str->s + str->l) ((uint32_t*)s)[k++] = (uint32_t)strtol(p, &p, 0), ++p; - else if (str->s[5] == 'f') while (p < str->s + str->l) ((float*)s)[k++] = (float)strtof(p, &p), ++p; + else if (str->s[5] == 'f') while (p < str->s + str->l) ((float*)s)[k++] = (float)strtod(p, &p), ++p; else parse_error(fp->n_lines, "unrecognized array type"); s += Bsize * n; doff += size; } else parse_error(fp->n_lines, "unrecognized type");