aboutsummaryrefslogtreecommitdiff
path: root/binutils/resrc.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-04-09 17:06:14 +0000
committerNick Clifton <nickc@redhat.com>2002-04-09 17:06:14 +0000
commitb24eb5ac22f573f4f45547872cdadcf7f7c9d682 (patch)
treea72d2400770148709b242ee9fc21613167bf9447 /binutils/resrc.c
parentf7d63484de877e1d0efe47ed768eb893332e5c5d (diff)
downloadgdb-b24eb5ac22f573f4f45547872cdadcf7f7c9d682.zip
gdb-b24eb5ac22f573f4f45547872cdadcf7f7c9d682.tar.gz
gdb-b24eb5ac22f573f4f45547872cdadcf7f7c9d682.tar.bz2
Fix overlooked sublang shift bug.
Add testcase.
Diffstat (limited to 'binutils/resrc.c')
-rw-r--r--binutils/resrc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/resrc.c b/binutils/resrc.c
index a9b3ba8..773e08a 100644
--- a/binutils/resrc.c
+++ b/binutils/resrc.c
@@ -1592,7 +1592,8 @@ write_rc_directory (e, rd, type, name, language, level)
&& (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;