aboutsummaryrefslogtreecommitdiff
path: root/binutils/dlltool.c
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1995-11-29 01:25:25 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1995-11-29 01:25:25 +0000
commit799de4c4a08e6b52add721116d23a1109ee9b324 (patch)
tree22b5e4d88cca4bcd01c5e0bf9bb545d78763719e /binutils/dlltool.c
parent4588619966469ca01cda47a27a0adb1debbf46a1 (diff)
downloadgdb-799de4c4a08e6b52add721116d23a1109ee9b324.zip
gdb-799de4c4a08e6b52add721116d23a1109ee9b324.tar.gz
gdb-799de4c4a08e6b52add721116d23a1109ee9b324.tar.bz2
* dlltool.c (fill_ordinals): Don't reference d_export_vec if
there are no exported functions.
Diffstat (limited to 'binutils/dlltool.c')
-rw-r--r--binutils/dlltool.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 2a5b640..156dde9 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -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;
}