* resbin.c (bin_to_res_string): Correct adjustment of data and
authorIan Lance Taylor <ian@airs.com>
Tue, 29 Jul 1997 15:06:48 +0000 (15:06 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 29 Jul 1997 15:06:48 +0000 (15:06 +0000)
length.  From Ton van Overbeek <tvoverbe@wk.estec.esa.nl>.

binutils/ChangeLog
binutils/resbin.c

index 7cb371350a8eb46a00795257a6233efda7f8a2bc..579ce2787745d6e240152348bb619ccac8ec87e2 100644 (file)
@@ -1,3 +1,8 @@
+Tue Jul 29 11:06:03 1997  Ian Lance Taylor  <ian@cygnus.com>
+
+       * resbin.c (bin_to_res_string): Correct adjustment of data and
+       length.  From Ton van Overbeek <tvoverbe@wk.estec.esa.nl>.
+
 Tue Jul 22 18:01:23 1997  Ian Lance Taylor  <ian@cygnus.com>
 
        * nlmconv.c (link_inputs): Call libiberty pexecute function.
index 47d102c4b906c6078101c40b77774313f2e40a37..24432d27eaee16712257d077bfd370f0e8467747 100644 (file)
@@ -667,8 +667,8 @@ bin_to_res_string (data, length, big_endian)
            s[j] = get_16 (big_endian, data + 2 + j * 2);
        }
 
-      data += 2 + slen;
-      length -= 2 + slen;
+      data += 2 + 2 * slen;
+      length -= 2 + 2 * slen;
     }
 
   r = (struct res_resource *) res_alloc (sizeof *r);