Explorar o código

* 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 -

marco %!s(int64=15) %!d(string=hai) anos
pai
achega
deb78080ed
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      rtl/win/sysutils.pp

+ 2 - 2
rtl/win/sysutils.pp

@@ -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;