windres bug + fix
Dmitry Timoshkov
dmitry@baikal.ru
Thu Jul 5 22:33:00 GMT 2001
Hello.
This simple resource file causes windres to fail:
rc -r windres_bug.rc
windres -I res -O coff -o windres_bug.res.o -i windres_bug.res
-- cut here: windres_bug.rc --
1 RCDATA
BEGIN
"text1"
END
2 RCDATA
BEGIN
"text2"
END
-- cut here --
The patch below fixes it. I have tested the patch with many different
resource files and it seem to have no side effects.
Dmitry Timoshkov <dmitry@codeweavers.com>
* resres.c (read_resource_entry): Align after reading data.
--- binutils-20010425-2/binutils/resres.c Fri Jul 06 04:38:02 2001
+++ resres.c Fri Jul 06 04:39:34 2001
@@ -177,6 +177,9 @@
buff = res_alloc (reshdr.data_size);
/* Read data */
read_res_data (buff, reshdr.data_size, 1);
+
+ res_align_file ();
+
/* Convert binary data to resource */
r = bin_to_res (type, buff, reshdr.data_size, 0);
r->res_info = resinfo;
P.S.
Why Cygwin version of binutils is so different from the official release
of binutils 2.11.2? Is it expected to have both branches merged?
--
Dmitry at Baikal.ru
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list