diff options
author | Christopher Faylor <me+cygwin@cgf.cx> | 2003-10-02 14:13:10 +0000 |
---|---|---|
committer | Christopher Faylor <me+cygwin@cgf.cx> | 2003-10-02 14:13:10 +0000 |
commit | b95f6b0c7ee0e107c6ff836573716187a73ffd8b (patch) | |
tree | d16267aef8c2044d8cae5856d712b9df489955ff /binutils/resrc.c | |
parent | 4b7f0676e44795d854404f5bc7d3fd17e6b31b30 (diff) | |
download | gdb-b95f6b0c7ee0e107c6ff836573716187a73ffd8b.zip gdb-b95f6b0c7ee0e107c6ff836573716187a73ffd8b.tar.gz gdb-b95f6b0c7ee0e107c6ff836573716187a73ffd8b.tar.bz2 |
* resrc.c (define_icon): Fix storage of color attributes 'planes' and 'bit
count' in icon groups.
Diffstat (limited to 'binutils/resrc.c')
-rw-r--r-- | binutils/resrc.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/binutils/resrc.c b/binutils/resrc.c index 2613b39..b8b69e6 100644 --- a/binutils/resrc.c +++ b/binutils/resrc.c @@ -1040,10 +1040,20 @@ define_icon (struct res_id id, const struct res_res_info *resinfo, cg->height = icondirs[i].height; cg->colors = icondirs[i].colorcount; - cg->planes = 1; - cg->bits = 0; - while ((1 << cg->bits) < cg->colors) - ++cg->bits; + if (icondirs[i].u.icon.planes) + cg->planes = icondirs[i].u.icon.planes; + else + cg->planes = 1; + + if (icondirs[i].u.icon.bits) + cg->bits = icondirs[i].u.icon.bits; + else + { + cg->bits = 0; + + while ((1L << cg->bits) < cg->colors) + ++cg->bits; + } cg->bytes = icondirs[i].bytes; cg->index = first_icon + i + 1; |