This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch binutils]: Fix PR 13297 for windres
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: Binutils <binutils at sourceware dot org>
- Cc: Nick Clifton <nickc at redhat dot com>
- Date: Sat, 11 Feb 2012 10:49:15 +0100
- Subject: [patch binutils]: Fix PR 13297 for windres
Hi,
this patch fixes the rc-dump for control-elemenents without text.
Those are EDITTEXT, COMBOBOX, LISTBOX, and SCROLLBAR.
ChangeLog
2012-02-11 Kai Tietz <ktietz@redhat.com>
PR binutils/13297
* resrc.c (write_rc_dialog_control): Omit text dump for
EDITTEXT, COMBOBOX, LISTBOX, and SCROLLBAR.
Tested for i686-w64-mingw32, and x86_64-w64-mingw32.
Ok for apply?
Regards,
Kai
Index: src/binutils/resrc.c
===================================================================
--- src.orig/binutils/resrc.c
+++ src/binutils/resrc.c
@@ -2650,7 +2650,13 @@ write_rc_dialog_control (FILE *e, const
ci = NULL;
}
- if (control->text.named || control->text.u.id != 0)
+ /* For EDITTEXT, COMBOBOX, LISTBOX, and SCROLLBAR don't dump text. */
+ if ((control->text.named || control->text.u.id != 0)
+ && (!ci
+ || (ci->class != CTL_EDIT
+ && ci->class != CTL_COMBOBOX
+ && ci->class != CTL_LISTBOX
+ && ci->class != CTL_SCROLLBAR)))
{
fprintf (e, " ");
res_id_print (e, control->text, 1);