This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]