msvcrt: Don't depend on how __lc_time_data was allocated in _W_Getdays.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
66d702668a
commit
2d23512da1
|
@ -494,11 +494,14 @@ MSVCRT_wchar_t* CDECL _W_Getdays(void)
|
|||
{
|
||||
MSVCRT___lc_time_data *cur = get_locinfo()->lc_time_curr;
|
||||
MSVCRT_wchar_t *out;
|
||||
int i, len, size;
|
||||
int i, len, size = 0;
|
||||
|
||||
TRACE("\n");
|
||||
|
||||
size = cur->wstr.names.short_mon[0]-cur->wstr.names.short_wday[0];
|
||||
for(i=0; i<7; i++) {
|
||||
size += strlenW(cur->wstr.names.short_wday[i]) + 1;
|
||||
size += strlenW(cur->wstr.names.wday[i]) + 1;
|
||||
}
|
||||
out = MSVCRT_malloc((size+1)*sizeof(*out));
|
||||
if(!out)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue