Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b65d1360
Commit
b65d1360
authored
Feb 25, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed callers of GetLocaleInfoW to use the correct buffer size.
parent
f39be9ff
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
locale.c
dlls/kernel/locale.c
+6
-6
variant.c
dlls/oleaut32/variant.c
+2
-2
init.c
dlls/wineps/init.c
+1
-1
No files found.
dlls/kernel/locale.c
View file @
b65d1360
...
...
@@ -143,8 +143,8 @@ static const char *debugstr_lang( LANGID lang )
char
buffer
[
8
];
LCID
lcid
=
MAKELCID
(
lang
,
SORT_DEFAULT
);
GetLocaleInfoW
(
lcid
,
LOCALE_SISO639LANGNAME
|
LOCALE_NOUSEROVERRIDE
,
langW
,
sizeof
(
langW
));
GetLocaleInfoW
(
lcid
,
LOCALE_SISO3166CTRYNAME
|
LOCALE_NOUSEROVERRIDE
,
countryW
,
sizeof
(
countryW
));
GetLocaleInfoW
(
lcid
,
LOCALE_SISO639LANGNAME
|
LOCALE_NOUSEROVERRIDE
,
langW
,
sizeof
(
langW
)
/
sizeof
(
WCHAR
)
);
GetLocaleInfoW
(
lcid
,
LOCALE_SISO3166CTRYNAME
|
LOCALE_NOUSEROVERRIDE
,
countryW
,
sizeof
(
countryW
)
/
sizeof
(
WCHAR
)
);
strcpyWtoA
(
buffer
,
langW
);
strcat
(
buffer
,
"_"
);
strcpyWtoA
(
buffer
+
strlen
(
buffer
),
countryW
);
...
...
@@ -322,9 +322,9 @@ static BOOL CALLBACK find_language_id_proc( HMODULE hModule, LPCWSTR type,
buf_country
[
0
]
=
0
;
GetLocaleInfoW
(
lcid
,
LOCALE_SISO639LANGNAME
|
LOCALE_NOUSEROVERRIDE
,
buf_language
,
sizeof
(
buf_language
));
buf_language
,
sizeof
(
buf_language
)
/
sizeof
(
WCHAR
)
);
GetLocaleInfoW
(
lcid
,
LOCALE_SISO3166CTRYNAME
|
LOCALE_NOUSEROVERRIDE
,
buf_country
,
sizeof
(
buf_country
));
buf_country
,
sizeof
(
buf_country
)
/
sizeof
(
WCHAR
)
);
if
(
l_data
->
lang
[
0
]
&&
!
strcmpiW
(
l_data
->
lang
,
buf_language
))
{
...
...
@@ -347,7 +347,7 @@ static BOOL CALLBACK find_language_id_proc( HMODULE hModule, LPCWSTR type,
*/
buf_en_language
[
0
]
=
0
;
GetLocaleInfoW
(
lcid
,
LOCALE_SENGLANGUAGE
|
LOCALE_NOUSEROVERRIDE
,
buf_en_language
,
sizeof
(
buf_en_language
));
buf_en_language
,
sizeof
(
buf_en_language
)
/
sizeof
(
WCHAR
)
);
if
(
l_data
->
lang
[
0
]
&&
!
strcmpiW
(
l_data
->
lang
,
buf_en_language
))
goto
found
;
return
TRUE
;
/* not found, continue search */
...
...
@@ -438,7 +438,7 @@ static LANGID get_language_id(LPCSTR Lang, LPCSTR Country, LPCSTR Charset, LPCST
WCHAR
buffW
[
128
];
char
buffA
[
128
];
GetLocaleInfoW
(
MAKELCID
(
l_data
.
found_lang_id
[
i
],
SORT_DEFAULT
),
LOCALE_SLANGUAGE
|
LOCALE_NOUSEROVERRIDE
,
buffW
,
sizeof
(
buffW
));
LOCALE_SLANGUAGE
|
LOCALE_NOUSEROVERRIDE
,
buffW
,
sizeof
(
buffW
)
/
sizeof
(
WCHAR
)
);
strcpyWtoA
(
buffA
,
buffW
);
MESSAGE
(
" %s (%04X) - %s
\n
"
,
debugstr_lang
(
l_data
.
found_lang_id
[
i
]),
l_data
.
found_lang_id
[
i
],
buffA
);
...
...
dlls/oleaut32/variant.c
View file @
b65d1360
...
...
@@ -1428,7 +1428,7 @@ HRESULT WINAPI VarUdateFromDate(DATE dateIn, ULONG dwFlags, UDATE *lpUdate)
#define GET_NUMBER_TEXT(fld,name) \
buff[0] = 0; \
if (!GetLocaleInfoW(lcid, lctype|fld, buff,
sizeof(WCHAR) *
2)) \
if (!GetLocaleInfoW(lcid, lctype|fld, buff, 2)) \
WARN("buffer too small for " #fld "\n"); \
else \
if (buff[0]) lpChars->name = buff[0]; \
...
...
@@ -1451,7 +1451,7 @@ void VARIANT_GetLocalisedNumberChars(VARIANT_NUMBER_CHARS *lpChars, LCID lcid, D
/* Local currency symbols are often 2 characters */
lpChars
->
cCurrencyLocal2
=
'\0'
;
switch
(
GetLocaleInfoW
(
lcid
,
lctype
|
LOCALE_SCURRENCY
,
buff
,
sizeof
(
WCHAR
)
*
4
))
switch
(
GetLocaleInfoW
(
lcid
,
lctype
|
LOCALE_SCURRENCY
,
buff
,
sizeof
(
buff
)
/
sizeof
(
WCHAR
)
))
{
case
3
:
lpChars
->
cCurrencyLocal2
=
buff
[
1
];
/* Fall through */
case
2
:
lpChars
->
cCurrencyLocal
=
buff
[
0
];
...
...
dlls/wineps/init.c
View file @
b65d1360
...
...
@@ -652,7 +652,7 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCSTR name)
DWORD
papersize
;
if
(
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_IPAPERSIZE
|
LOCALE_RETURN_NUMBER
,
(
LPWSTR
)
&
papersize
,
sizeof
(
papersize
)))
{
(
LPWSTR
)
&
papersize
,
sizeof
(
papersize
)
/
sizeof
(
WCHAR
)
))
{
PSDRV_DEVMODEA
dm
;
memset
(
&
dm
,
0
,
sizeof
(
dm
));
dm
.
dmPublic
.
dmFields
=
DM_PAPERSIZE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment