From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20766 invoked by alias); 19 Mar 2002 23:23:52 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 20684 invoked from network); 19 Mar 2002 23:23:51 -0000 Received: from unknown (HELO mail.danbbs.dk) (194.234.11.1) by sources.redhat.com with SMTP; 19 Mar 2002 23:23:51 -0000 Received: from danbbs.dk (pm5-106.danbbs.dk [194.234.11.106]) by mail.danbbs.dk (8.11.6/8.11.6) with ESMTP id g2JNVZK08926 for ; Wed, 20 Mar 2002 00:31:35 +0100 Message-ID: <3C97C8B3.BFE43CA8@danbbs.dk> Date: Tue, 19 Mar 2002 15:23:00 -0000 From: Gunnar Degnbol X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.19-pre2-ac4-gd1 i686) X-Accept-Language: en MIME-Version: 1.0 To: binutils@sources.redhat.com Subject: [PATCH] windres (ungarbled): (4) sublang shift bug when decompiling Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00394.txt.bz2 The incorrect value 8 is still used in one place in resrc.c instead of SUBLANG_SHIFT (10). ChangeLog: 2002-03-19 Gunnar Degnbol * 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<id.u.id >> SUBLANG_SHIFT) & 0xff); *language = re->id.u.id; } break;