* dlltool.c (fill_ordinals): Don't reference d_export_vec if
authorDavid Edelsohn <dje.gcc@gmail.com>
Wed, 29 Nov 1995 01:25:25 +0000 (01:25 +0000)
committerDavid Edelsohn <dje.gcc@gmail.com>
Wed, 29 Nov 1995 01:25:25 +0000 (01:25 +0000)
there are no exported functions.

binutils/ChangeLog
binutils/dlltool.c

index 25c514a50c8c6694c7c43f4e65fb2c658673f4b4..b645afb12bf4dc4cb258b3e1bbce79da026f353e 100644 (file)
@@ -1,3 +1,8 @@
+Tue Nov 28 17:23:44 1995  Doug Evans  <dje@canuck.cygnus.com>
+
+       * dlltool.c (fill_ordinals): Don't reference d_export_vec if
+       there are no exported functions.
+
 Mon Nov 27 13:05:59 1995  Ian Lance Taylor  <ian@cygnus.com>
 
        * configure: Regenerate with autoconf 2.7.
index 2a5b640c04ac27a41b83245d974629e5546359fa..156dde9124791d804b44e3f65491c32707002992 100644 (file)
@@ -1765,12 +1765,11 @@ fill_ordinals (d_export_vec)
 
   qsort (d_export_vec, d_nfuncs, sizeof (export_type *), pfunc);
 
-
-  /* Work out the lowest ordinal number */
-  if (d_export_vec[0])
-    d_low_ord = d_export_vec[0]->ordinal;
+  /* Work out the lowest and highest ordinal numbers.  */
   if (d_nfuncs) 
     {
+      if (d_export_vec[0])
+       d_low_ord = d_export_vec[0]->ordinal;
       if (d_export_vec[d_nfuncs-1])
        d_high_ord = d_export_vec[d_nfuncs-1]->ordinal;
     }