Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix signed overflow for hts_parse_decimal.
Obviously there can still be overflows if we attempt to parse numbers which are too big, but for the legally accepted range of this, parsing "-9,223,372,036,854,775,808" as tested in test/sam.c triggered a problem as the positive version doesn't fit in "long long". We parse as unsigned and only switch to signed via the implicit return type conversion (and probably exploiting twos-complement, but that's a fair assumption).
- Loading branch information