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
9b34a3a7
Commit
9b34a3a7
authored
Jul 05, 2012
by
Piotr Caban
Committed by
Alexandre Julliard
Jul 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp90: Fix parsing of floating point numbers starting with decimal separator.
parent
4c73236d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
8 deletions
+26
-8
locale.c
dlls/msvcp90/locale.c
+26
-8
No files found.
dlls/msvcp90/locale.c
View file @
9b34a3a7
...
@@ -4441,7 +4441,7 @@ static int num_get__Getffld(const num_get *this, char *dest, istreambuf_iterator
...
@@ -4441,7 +4441,7 @@ static int num_get__Getffld(const num_get *this, char *dest, istreambuf_iterator
char
*
dest_beg
=
dest
,
*
num_end
=
dest
+
25
,
*
exp_end
=
dest
+
31
,
*
groups
=
NULL
;
char
*
dest_beg
=
dest
,
*
num_end
=
dest
+
25
,
*
exp_end
=
dest
+
31
,
*
groups
=
NULL
;
wchar_t
sep
,
digits
[
11
],
*
digits_pos
;
wchar_t
sep
,
digits
[
11
],
*
digits_pos
;
const
char
*
grouping
;
const
char
*
grouping
;
BOOL
error
=
TRU
E
,
dest_empty
=
TRUE
;
BOOL
error
=
FALSE
,
got_digit
=
FALS
E
,
dest_empty
=
TRUE
;
TRACE
(
"(%p %p %p %p)
\n
"
,
dest
,
first
,
last
,
loc
);
TRACE
(
"(%p %p %p %p)
\n
"
,
dest
,
first
,
last
,
loc
);
...
@@ -4485,7 +4485,7 @@ static int num_get__Getffld(const num_get *this, char *dest, istreambuf_iterator
...
@@ -4485,7 +4485,7 @@ static int num_get__Getffld(const num_get *this, char *dest, istreambuf_iterator
break
;
break
;
}
}
}
else
{
}
else
{
error
=
FALS
E
;
got_digit
=
TRU
E
;
if
(
dest_empty
&&
first
->
val
==
digits
[
0
])
if
(
dest_empty
&&
first
->
val
==
digits
[
0
])
continue
;
continue
;
dest_empty
=
FALSE
;
dest_empty
=
FALSE
;
...
@@ -4532,8 +4532,10 @@ static int num_get__Getffld(const num_get *this, char *dest, istreambuf_iterator
...
@@ -4532,8 +4532,10 @@ static int num_get__Getffld(const num_get *this, char *dest, istreambuf_iterator
istreambuf_iterator_wchar_inc
(
first
);
istreambuf_iterator_wchar_inc
(
first
);
if
(
dest_empty
)
{
if
(
dest_empty
)
{
for
(;
first
->
strbuf
&&
first
->
val
==
digits
[
0
];
istreambuf_iterator_wchar_inc
(
first
))
for
(;
first
->
strbuf
&&
first
->
val
==
digits
[
0
];
istreambuf_iterator_wchar_inc
(
first
))
{
got_digit
=
TRUE
;
exp
--
;
exp
--
;
}
if
(
!
first
->
strbuf
||
!
wcschr
(
digits
,
first
->
val
))
if
(
!
first
->
strbuf
||
!
wcschr
(
digits
,
first
->
val
))
dest
--
;
dest
--
;
...
@@ -4543,8 +4545,15 @@ static int num_get__Getffld(const num_get *this, char *dest, istreambuf_iterator
...
@@ -4543,8 +4545,15 @@ static int num_get__Getffld(const num_get *this, char *dest, istreambuf_iterator
for
(;
first
->
strbuf
;
istreambuf_iterator_wchar_inc
(
first
))
{
for
(;
first
->
strbuf
;
istreambuf_iterator_wchar_inc
(
first
))
{
if
(
!
(
digits_pos
=
wcschr
(
digits
,
first
->
val
)))
if
(
!
(
digits_pos
=
wcschr
(
digits
,
first
->
val
)))
break
;
break
;
else
if
(
dest
<
num_end
)
else
if
(
dest
<
num_end
)
{
got_digit
=
TRUE
;
*
dest
++
=
'0'
+
digits_pos
-
digits
;
*
dest
++
=
'0'
+
digits_pos
-
digits
;
}
}
if
(
!
got_digit
)
{
*
dest_beg
=
'\0'
;
return
0
;
}
}
if
(
first
->
strbuf
&&
(
first
->
val
==
mb_to_wc
(
'e'
,
&
this
->
cvt
)
||
first
->
val
==
mb_to_wc
(
'E'
,
&
this
->
cvt
)))
{
if
(
first
->
strbuf
&&
(
first
->
val
==
mb_to_wc
(
'e'
,
&
this
->
cvt
)
||
first
->
val
==
mb_to_wc
(
'E'
,
&
this
->
cvt
)))
{
...
@@ -5541,7 +5550,7 @@ int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_it
...
@@ -5541,7 +5550,7 @@ int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_it
int
groups_no
=
0
,
cur_group
=
0
,
exp
=
0
;
int
groups_no
=
0
,
cur_group
=
0
,
exp
=
0
;
char
*
dest_beg
=
dest
,
*
num_end
=
dest
+
25
,
*
exp_end
=
dest
+
31
,
*
groups
=
NULL
,
sep
;
char
*
dest_beg
=
dest
,
*
num_end
=
dest
+
25
,
*
exp_end
=
dest
+
31
,
*
groups
=
NULL
,
sep
;
const
char
*
grouping
;
const
char
*
grouping
;
BOOL
error
=
TRU
E
,
dest_empty
=
TRUE
;
BOOL
error
=
FALSE
,
got_digit
=
FALS
E
,
dest_empty
=
TRUE
;
TRACE
(
"(%p %p %p %p)
\n
"
,
dest
,
first
,
last
,
loc
);
TRACE
(
"(%p %p %p %p)
\n
"
,
dest
,
first
,
last
,
loc
);
...
@@ -5578,7 +5587,7 @@ int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_it
...
@@ -5578,7 +5587,7 @@ int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_it
break
;
break
;
}
}
}
else
{
}
else
{
error
=
FALS
E
;
got_digit
=
TRU
E
;
if
(
dest_empty
&&
first
->
val
==
'0'
)
if
(
dest_empty
&&
first
->
val
==
'0'
)
continue
;
continue
;
dest_empty
=
FALSE
;
dest_empty
=
FALSE
;
...
@@ -5625,8 +5634,10 @@ int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_it
...
@@ -5625,8 +5634,10 @@ int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_it
istreambuf_iterator_char_inc
(
first
);
istreambuf_iterator_char_inc
(
first
);
if
(
dest_empty
)
{
if
(
dest_empty
)
{
for
(;
first
->
strbuf
&&
first
->
val
==
'0'
;
istreambuf_iterator_char_inc
(
first
))
for
(;
first
->
strbuf
&&
first
->
val
==
'0'
;
istreambuf_iterator_char_inc
(
first
))
{
got_digit
=
TRUE
;
exp
--
;
exp
--
;
}
if
(
!
first
->
strbuf
||
first
->
val
<
'1'
||
first
->
val
>
'9'
)
if
(
!
first
->
strbuf
||
first
->
val
<
'1'
||
first
->
val
>
'9'
)
dest
--
;
dest
--
;
...
@@ -5636,8 +5647,15 @@ int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_it
...
@@ -5636,8 +5647,15 @@ int __cdecl num_get_char__Getffld(const num_get *this, char *dest, istreambuf_it
for
(;
first
->
strbuf
;
istreambuf_iterator_char_inc
(
first
))
{
for
(;
first
->
strbuf
;
istreambuf_iterator_char_inc
(
first
))
{
if
(
first
->
val
<
'0'
||
first
->
val
>
'9'
)
if
(
first
->
val
<
'0'
||
first
->
val
>
'9'
)
break
;
break
;
else
if
(
dest
<
num_end
)
else
if
(
dest
<
num_end
)
{
got_digit
=
TRUE
;
*
dest
++
=
first
->
val
;
*
dest
++
=
first
->
val
;
}
}
if
(
!
got_digit
)
{
*
dest_beg
=
'\0'
;
return
0
;
}
}
if
(
first
->
strbuf
&&
(
first
->
val
==
'e'
||
first
->
val
==
'E'
))
{
if
(
first
->
strbuf
&&
(
first
->
val
==
'e'
||
first
->
val
==
'E'
))
{
...
...
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