Browse Source

* avoid rangecheck mantis 0038791

git-svn-id: trunk@49250 -
marco 4 years ago
parent
commit
8ad6271fa1
1 changed files with 2 additions and 1 deletions
  1. 2 1
      rtl/win/sysutils.pp

+ 2 - 1
rtl/win/sysutils.pp

@@ -1046,7 +1046,8 @@ begin
   if L > 0 then
     begin
       SetLength(Buf,L-1); // L includes terminating NULL
-      L := GetLocaleInfoW(LID, LT, @Buf[1], L);
+      if l>1 Then
+        L := GetLocaleInfoW(LID, LT, @Buf[1], L);
       result:=buf;
     end
   else