mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 08:30:54 +02:00
* fix for Mantis 16564. Raise buffersize of getlocalechar to MSDN limit 4,
so that locales with long dateseparators (time,thousand,decimal) now succeed, even if limited only to first char. (Delphi limit) git-svn-id: trunk@15328 -
This commit is contained in:
parent
46ff0c4fc4
commit
deb78080ed
@ -630,9 +630,9 @@ end;
|
||||
|
||||
function GetLocaleChar(LID, LT: Longint; Def: Char): Char;
|
||||
var
|
||||
Buf: array[0..1] of Char;
|
||||
Buf: array[0..3] of Char; // sdate allows 4 chars.
|
||||
begin
|
||||
if GetLocaleInfo(LID, LT, Buf, 2) > 0 then
|
||||
if GetLocaleInfo(LID, LT, Buf, sizeof(buf)) > 0 then
|
||||
Result := Buf[0]
|
||||
else
|
||||
Result := Def;
|
||||
|
Loading…
Reference in New Issue
Block a user