# GNU Coreutils seq fixes locale decimal point and hex float parsing bugs

> **Key takeaway:** The seq utility now correctly recognizes locale-specific decimal separators and uppercase hexadecimal exponents, preventing infinite loops and incorrect integer parsing.

**Published:** 2026-11-02T23:43:14+00:00 
**Source:** GNU Coreutils Releases &amp; Commits 
**Category:** system-core 
**Canonical URL:** https://fosswire.org/news/gnu-coreutils-seq-fixes-locale-decimal-point-and-hex-float-p.html 

## Summary
A critical bug fix has been submitted to GNU Coreutils addressing how the 'seq' utility handles numeric operands. Previously, the tool failed to recognize decimal points defined by the user's current locale—such as a comma in French locales—and incorrectly treated these values as integers. This error could lead to infinite loops or incorrect output sequences when using non-standard decimal separators.

Additionally, the update improves support for hexadecimal floating-point numbers by allowing uppercase 'P' in the exponent. The fix was identified by Anthropic's OSS Scanner (bug ANT-2026-ERV7HOGN) and addresses regressions that have existed in various versions of the package since coreutils-8.24. The patch ensures that negative operands using locale-specific separators are no longer misidentified as command-line options.

## Technical improvements in seq.c
- **Locale Awareness:** The `scan_arg` function now utilizes `localeconv()` to retrieve the `decimal_point` character, ensuring that inputs like '0,5' are parsed as floats rather than integers in locales where a comma is the separator.
- **Hexadecimal Float Support:** The parser has been updated to recognize both lowercase 'p' and uppercase 'P' as exponent indicators in hexadecimal floating-point formats (e.g., '0x1P-1').
- **Option Parsing Logic:** The `main` function was modified to prevent negative numbers using locale-specific decimal points (e.g., '-,5') from being incorrectly interpreted as command-line options.
- **Width Calculation:** The logic for calculating output width has been adjusted to account for multi-byte decimal points, ensuring correct alignment in fixed-width output modes.

## Why it matters
This fix is vital for system administrators and developers working in international environments where non-period decimal separators are standard. It prevents potential script failures and infinite loops in automation workflows that rely on 'seq' for generating numeric ranges in localized shell environments.