On Sun, Feb 07, 2010 at 12:46:34PM +0100, Andy Kittner wrote:
On second reading I see that the code uses sizeof(OPENFILENAME_SIZE_VERSION_400) which is most likely not intendedAccording to gdb fileStruct.lStructSize ends up as 8 bytes
here, as OPENFILENAME_SIZE_VERSION_400 already contains the required size.
Attached patch should fix the issue properly.
Regards,
Andy
--
I WILL NOT CUT CORNERS
" " " " " "
" " " " " "
" " " " " "
Bart Simpson on chalkboard in episode 7F11
diff -r 8a0a8f10b43e src/gui_w48.c
--- a/src/gui_w48.c Wed Feb 03 18:14:49 2010 +0100
+++ b/src/gui_w48.c Sun Feb 07 13:03:44 2010 +0100
@@ -3352,7 +3352,7 @@
#ifdef OPENFILENAME_SIZE_VERSION_400
/* be compatible with Windows NT 4.0 */
/* TODO: what to use for OPENFILENAMEW??? */
- fileStruct.lStructSize = sizeof(OPENFILENAME_SIZE_VERSION_400);
+ fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400;
#else
fileStruct.lStructSize = sizeof(fileStruct);
#endif
@@ -3513,7 +3513,7 @@
memset(&fileStruct, 0, sizeof(OPENFILENAME));
#ifdef OPENFILENAME_SIZE_VERSION_400
/* be compatible with Windows NT 4.0 */
- fileStruct.lStructSize = sizeof(OPENFILENAME_SIZE_VERSION_400);
+ fileStruct.lStructSize = OPENFILENAME_SIZE_VERSION_400;
#else
fileStruct.lStructSize = sizeof(fileStruct);
#endif
pgpKhbSKhO5RS.pgp
Description: PGP signature
