aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2025-10-28 12:18:47 +0000
committerPádraig Brady <P@draigBrady.com>2025-10-28 12:23:28 +0000
commit8177cc5b5d953cdc90d4be060c2ea52e46452352 (patch)
tree19c8debd508ce4a0f497beaf7f92fddde9ad45e5 /src
parentmaint: prefer FTS_ROOTLEVEL when checking the fts_level of an FTSENT (diff)
downloadcoreutils-8177cc5b5d953cdc90d4be060c2ea52e46452352.tar.gz
coreutils-8177cc5b5d953cdc90d4be060c2ea52e46452352.zip
numfmt: ensure fields don't split on nbsp
* src/numfmt.c (newline_or_blank): Explicitly ensure we don't match NBSP as on platforms like NetBSD 10 or Solaris 11, NBSP is considered a blank character. This should have been part of commit v9.8-39-g8bc11f80a Solaris 11 test failure reported by Bruno Haible.
Diffstat (limited to 'src')
-rw-r--r--src/numfmt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/numfmt.c b/src/numfmt.c
index 1ae831ba3..8fc5b478a 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -216,7 +216,8 @@ static bool dev_debug = false;
static bool
newline_or_blank (mcel_t g)
{
- return g.ch == '\n' || c32isblank (g.ch);
+ return g.ch == '\n'
+ || (c32isblank (g.ch) && ! c32isnbspace (g.ch));
}
static inline int