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
0f9f0a16
Commit
0f9f0a16
authored
Apr 27, 2011
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 27, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't use additional buffer in pf_integer_conv.
parent
35cc03d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
printf.h
dlls/msvcrt/printf.h
+15
-17
No files found.
dlls/msvcrt/printf.h
View file @
0f9f0a16
...
...
@@ -254,12 +254,9 @@ static inline void FUNC_NAME(pf_integer_conv)(char *buf, int buf_len,
{
unsigned
int
base
;
const
char
*
digits
;
char
tmp
;
int
i
,
j
,
k
;
char
number
[
40
],
*
tmp
=
number
;
if
(
buf_len
>
sizeof
number
)
tmp
=
HeapAlloc
(
GetProcessHeap
(),
0
,
buf_len
);
if
(
flags
->
Format
==
'o'
)
base
=
8
;
...
...
@@ -280,35 +277,36 @@ static inline void FUNC_NAME(pf_integer_conv)(char *buf, int buf_len,
i
=
0
;
if
(
x
==
0
&&
flags
->
Precision
)
tmp
[
i
++
]
=
'0'
;
buf
[
i
++
]
=
'0'
;
else
{
while
(
x
!=
0
)
{
j
=
(
ULONGLONG
)
x
%
base
;
x
=
(
ULONGLONG
)
x
/
base
;
tmp
[
i
++
]
=
digits
[
j
];
buf
[
i
++
]
=
digits
[
j
];
}
}
k
=
flags
->
Precision
-
i
;
while
(
k
--
>
0
)
tmp
[
i
++
]
=
'0'
;
buf
[
i
++
]
=
'0'
;
if
(
flags
->
Alternate
)
{
if
(
base
==
16
)
{
tmp
[
i
++
]
=
digits
[
16
];
tmp
[
i
++
]
=
'0'
;
}
else
if
(
base
==
8
&&
tmp
[
i
-
1
]
!=
'0'
)
tmp
[
i
++
]
=
'0'
;
buf
[
i
++
]
=
digits
[
16
];
buf
[
i
++
]
=
'0'
;
}
else
if
(
base
==
8
&&
buf
[
i
-
1
]
!=
'0'
)
buf
[
i
++
]
=
'0'
;
}
buf
[
i
]
=
'\0'
;
j
=
0
;
while
(
i
--
>
0
)
buf
[
j
++
]
=
tmp
[
i
];
buf
[
j
]
=
'\0'
;
while
(
i
--
>
j
)
{
tmp
=
buf
[
j
];
buf
[
j
]
=
buf
[
i
];
buf
[
i
]
=
tmp
;
j
++
;
}
/* Adjust precision so pf_fill won't truncate the number later */
flags
->
Precision
=
strlen
(
buf
);
if
(
tmp
!=
number
)
HeapFree
(
GetProcessHeap
(),
0
,
tmp
);
}
static
inline
void
FUNC_NAME
(
pf_fixup_exponent
)(
char
*
buf
)
...
...
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