[Bug 35369] New: differences between ./dlls/shlwapi/wsprintf.c and ./dlls/user32/wsprintf.c
wine-bugs at winehq.org
wine-bugs at winehq.org
Sat Jan 11 16:52:52 CST 2014
http://bugs.winehq.org/show_bug.cgi?id=35369
Bug ID: 35369
Summary: differences between ./dlls/shlwapi/wsprintf.c and
./dlls/user32/wsprintf.c
Product: Wine
Version: 1.7.10
Hardware: x86
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: shlwapi
Assignee: wine-bugs at winehq.org
Reporter: wine13.10.hackie at spamgourmet.com
Classification: Unclassified
I was looking for an implementation of wsprintf, then I saw the comments in
these files:
dlls/shlwapi/wsprintf.c:
* This code is duplicated in user32. If you change something here make sure
* to change it in user32 too.
dlls/user32/wsprintf.c:
* This code is duplicated in shlwapi. If you change something here make sure
* to change it in shlwapi too.
This didn't always seem to happen in the past, as you can see in the diff:
--- ./dlls/shlwapi/wsprintf.c 2014-01-03 20:00:47.000000000 +0100
+++ ./dlls/user32/wsprintf.c 2014-01-03 20:00:47.000000000 +0100
(only the most remarkable changes:)
(see the data types UINT vs INT)
-INT WINAPI wvnsprintfA( LPSTR buffer, INT maxlen, LPCSTR spec, __ms_va_list
args )
+static INT wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, __ms_va_list
args )
- CHAR number[20];
+ CHAR number[21]; /* 64bit number can be 18446744073709551616 which is 20
chars. and a \0 */
Last one might possibly be the reason for some instabilities, depends where the
function is used. It's possibly a good idea to try to use the share the same
file on both places - and to look for more similar problems...
--
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.
More information about the wine-bugs
mailing list