http://bugs.winehq.org/show_bug.cgi?id=29099
Carlo Bramini carlo.bramix@libero.it changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |carlo.bramix@libero.it
--- Comment #3 from Carlo Bramini carlo.bramix@libero.it 2012-04-09 17:03:06 CDT --- I tried to do some debugging on this bug and I discovered that PathRemoveExtension() crashes on Windows too if a constant string like "labview.txt"is given as parameter, but it does not if the parameter is just "labview": still constant but without dot and extension.
The implementation of PathRemoveExtensionA/W in the source of WINE is using PathFindExtensionA/W for finding the extension to be removed; according to MSDN:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb773587%28v=vs.85%2...
"Returns the address of the "." that precedes the extension within pszPath if an extension is found, or the address of the terminating null character otherwise."
So, the only logical explanation I can think on this behavior is that the function does not write the NUL character if it is already existing at the given position. This condition makes lucky working the function, but the reason why LabView is feeding a constant string is a bit unknown to me...
I have posted a patch here about this bug:
http://source.winehq.org/patches/data/85297
Sincerely,
Carlo Bramini.