Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
c001ffae
Commit
c001ffae
authored
Jul 03, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fix strings allocation.
parent
60ddd438
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
20 deletions
+25
-20
date.c
dlls/jscript/date.c
+25
-20
No files found.
dlls/jscript/date.c
View file @
c001ffae
...
...
@@ -531,11 +531,13 @@ static HRESULT Date_toString(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA
GetLocaleInfoW
(
lcid_en
,
month_id
,
month
,
size
);
len
+=
size
-
1
;
year
=
year_from_time
(
time
)
/
10
;
while
(
year
)
{
year
=
year_from_time
(
time
);
if
(
year
<
0
)
year
=
-
year
+
1
;
do
{
year
/=
10
;
len
++
;
}
}
while
(
year
);
year
=
year_from_time
(
time
);
if
(
year
<
0
)
{
...
...
@@ -544,11 +546,11 @@ static HRESULT Date_toString(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARA
len
+=
5
;
}
day
=
date_from_time
(
time
)
/
10
;
while
(
day
)
{
day
=
date_from_time
(
time
);
do
{
day
/=
10
;
len
++
;
}
}
while
(
day
);
day
=
date_from_time
(
time
);
offset
=
date
->
bias
+
...
...
@@ -733,11 +735,13 @@ static HRESULT Date_toUTCString(DispatchEx *dispex, LCID lcid, WORD flags, DISPP
GetLocaleInfoW
(
lcid_en
,
month_id
,
month
,
size
);
len
+=
size
-
1
;
year
=
year_from_time
(
date
->
time
)
/
10
;
while
(
year
)
{
year
=
year_from_time
(
date
->
time
);
if
(
year
<
0
)
year
=
-
year
+
1
;
do
{
year
/=
10
;
len
++
;
}
}
while
(
year
);
year
=
year_from_time
(
date
->
time
);
if
(
year
<
0
)
{
...
...
@@ -746,11 +750,11 @@ static HRESULT Date_toUTCString(DispatchEx *dispex, LCID lcid, WORD flags, DISPP
len
+=
5
;
}
day
=
date_from_time
(
date
->
time
)
/
10
;
while
(
day
)
{
day
=
date_from_time
(
date
->
time
);
do
{
day
/=
10
;
len
++
;
}
}
while
(
day
);
day
=
date_from_time
(
date
->
time
);
date_str
=
SysAllocStringLen
(
NULL
,
len
);
...
...
@@ -842,11 +846,13 @@ static HRESULT Date_toDateString(DispatchEx *dispex, LCID lcid, WORD flags, DISP
GetLocaleInfoW
(
lcid_en
,
month_id
,
month
,
size
);
len
+=
size
-
1
;
year
=
year_from_time
(
time
)
/
10
;
while
(
year
)
{
year
=
year_from_time
(
time
);
if
(
year
<
0
)
year
=
-
year
+
1
;
do
{
year
/=
10
;
len
++
;
}
}
while
(
year
);
year
=
year_from_time
(
time
);
if
(
year
<
0
)
{
...
...
@@ -855,11 +861,11 @@ static HRESULT Date_toDateString(DispatchEx *dispex, LCID lcid, WORD flags, DISP
len
+=
5
;
}
day
=
date_from_time
(
time
)
/
10
;
while
(
day
)
{
day
=
date_from_time
(
time
);
do
{
day
/=
10
;
len
++
;
}
}
while
(
day
);
day
=
date_from_time
(
time
);
date_str
=
SysAllocStringLen
(
NULL
,
len
);
...
...
@@ -2172,9 +2178,8 @@ static HRESULT create_date(script_ctx_t *ctx, BOOL use_constr, DOUBLE time, Disp
DateInstance
*
date
;
HRESULT
hres
;
TIME_ZONE_INFORMATION
tzi
;
DWORD
dret
;
dret
=
GetTimeZoneInformation
(
&
tzi
);
GetTimeZoneInformation
(
&
tzi
);
date
=
heap_alloc_zero
(
sizeof
(
DateInstance
));
if
(
!
date
)
...
...
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