From b24eb5ac22f573f4f45547872cdadcf7f7c9d682 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 9 Apr 2002 17:06:14 +0000 Subject: Fix overlooked sublang shift bug. Add testcase. --- binutils/resrc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'binutils/resrc.c') 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; -- cgit v1.1