public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] windres (ungarbled): (4) sublang shift bug when decompiling
@ 2002-03-19 15:23 Gunnar Degnbol
  2002-04-09 10:06 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Gunnar Degnbol @ 2002-03-19 15:23 UTC (permalink / raw)
  To: binutils

The incorrect value 8 is still used in one place in resrc.c 
instead of SUBLANG_SHIFT (10). 

ChangeLog:

2002-03-19 Gunnar Degnbol <degnbol@danbbs.dk>

	* resrc.c: Fix overlooked sublang shift bug

sublang.rc:

LANGUAGE 9, 1
101 DIALOG DISCARDABLE  0, 0, 186, 95
BEGIN
    DEFPUSHBUTTON "OK",1,129,7,50,14
END

Before patch:

$ /bin/windres.exe -i sublang.rc
LANGUAGE 9, 4

101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80880000
BEGIN
  DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14, 0x50010001
END

After patch:

$ windres.exe -i sublang.rc
LANGUAGE 9, 1

101 DIALOG MOVEABLE DISCARDABLE 0, 0, 186, 95
STYLE 0x80880000
BEGIN
  DEFPUSHBUTTON "OK", 1, 129, 7, 50, 14, 0x50010001
END

sublang.patch:
--- binutils/resrc.c	Sun Mar 17 14:47:27 2002
+++ binutils.new/resrc.c	Sun Mar 17 14:47:38 2002
@@ -1592,7 +1592,8 @@
 	      && (re->id.u.id & 0xffff) == re->id.u.id)
 	    {
 	      fprintf (e, "LANGUAGE %lu, %lu\n",
-		       re->id.u.id & 0xff, (re->id.u.id >> 8) & 0xff);
+		       re->id.u.id & ((1<<SUBLANG_SHIFT)-1), 
+		       (re->id.u.id >> SUBLANG_SHIFT) & 0xff);
 	      *language = re->id.u.id;
 	    }
 	  break;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] windres (ungarbled): (4) sublang shift bug when decompiling
  2002-03-19 15:23 [PATCH] windres (ungarbled): (4) sublang shift bug when decompiling Gunnar Degnbol
@ 2002-04-09 10:06 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2002-04-09 10:06 UTC (permalink / raw)
  To: gunnar; +Cc: binutils

Hi Gunnar,

: 2002-03-19 Gunnar Degnbol <degnbol@danbbs.dk>
: 
: 	* resrc.c: Fix overlooked sublang shift bug

Approved and applied.

Testcase also generated.

Cheers
	Nick

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-09 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-19 15:23 [PATCH] windres (ungarbled): (4) sublang shift bug when decompiling Gunnar Degnbol
2002-04-09 10:06 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).