summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rtl/win/sysutils.pp3
1 files changed, 2 insertions, 1 deletions
diff --git a/rtl/win/sysutils.pp b/rtl/win/sysutils.pp
index 594fc0abfc..2776b5e135 100644
--- a/rtl/win/sysutils.pp
+++ b/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