mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
Ticket #3883: size_trunc_sep() breaks on multibyte locales.
The bug was introduced in b3867a6e15
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
917cd17281
commit
069306eb2e
@ -383,7 +383,9 @@ size_trunc_sep (uintmax_t size, gboolean use_si)
|
||||
p += strlen (p) - 1;
|
||||
d = x + sizeof (x) - 1;
|
||||
*d-- = '\0';
|
||||
while (p >= y && (isalpha ((unsigned char) *p) || (unsigned char) *p == ' '))
|
||||
/* @size format is "size unit", i.e. "[digits][space][letters]".
|
||||
Copy all charactes after digits. */
|
||||
while (p >= y && !g_ascii_isdigit (*p))
|
||||
*d-- = *p--;
|
||||
for (count = 0; p >= y; count++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user