diff options
Diffstat (limited to 'win/winDumpExts.c')
-rw-r--r-- | win/winDumpExts.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/win/winDumpExts.c b/win/winDumpExts.c index 36b03c3..cbf5eeb 100644 --- a/win/winDumpExts.c +++ b/win/winDumpExts.c @@ -19,7 +19,7 @@ * compiler other than Visual C++. *---------------------------------------------------------------------- * - * RCS: @(#) $Id: winDumpExts.c,v 1.1.2.1 1998/09/24 23:59:54 stanton Exp $ + * RCS: @(#) $Id: winDumpExts.c,v 1.1.2.2 1999/02/10 23:31:29 stanton Exp $ */ #include <windows.h> @@ -236,8 +236,14 @@ DumpExternals(PIMAGE_SYMBOL pSymbolTable, FILE *fout, unsigned cSymbols) strcpy(symbol, s); } s = symbol; - f = strchr(s, '@'); - if (f) { + + /* + * Skip to the last @ and ensure it is followed by digits, + * otherwise it is probably part of a C++ mangled name. + */ + + f = strrchr(s, '@'); + if (f && f[1] >= '0' && f[1] <= '9') { *f = 0; } #if defined(_MSC_VER) && defined(_X86_) @@ -468,10 +474,6 @@ main(int argc, char **argv) if (arg == argc) { goto Usage; } - fprintf(fout, "LIBRARY %s\n", dllname); - fprintf(fout, "EXETYPE WINDOWS\n"); - fprintf(fout, "CODE PRELOAD MOVEABLE DISCARDABLE\n"); - fprintf(fout, "DATA PRELOAD MOVEABLE MULTIPLE\n\n"); fprintf(fout, "EXPORTS\n"); } |