diff --git a/ksym_mod.c b/ksym_mod.c index d6a40b4..af053dc 100644 --- a/ksym_mod.c +++ b/ksym_mod.c @@ -424,7 +424,10 @@ static int AddModule(address, symbol) } else { + if (num_modules > 0) mp = &sym_array_modules[num_modules - 1]; + else + mp = &sym_array_modules[0]; AddSymbol(mp, address, symbol); }