Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ Bug fixes
BGZF::errcode field after calling bgzf_close() as it may no longer be valid.
(PR #2035, #2042)

* Speed up hts_parse_decimal() handling of oversized exponents
(PR #2045)

Documentation updates
---------------------

Expand Down
4 changes: 2 additions & 2 deletions hts.c
Original file line number Diff line number Diff line change
Expand Up @@ -3923,8 +3923,8 @@ long long hts_parse_decimal(const char *str, char **strend, int flags)
}

e -= decimals;
while (e > 0) n *= 10, e--;
while (e < 0) lost += n % 10, n /= 10, e++;
while (e > 0 && n) n *= 10, e--;
while (e < 0 && n) lost += n % 10, n /= 10, e++;

if (lost > 0) {
hts_log_warning("Discarding fractional part of %.*s", (int)(s - str), str);
Expand Down
Loading