From 064cce0ea297fa7aac7b01fd47c298d59a46e974 Mon Sep 17 00:00:00 2001 From: Catalin Patulea Date: Wed, 9 Jul 2003 22:01:33 +0000 Subject: [PATCH] Only display filenames when showing addresses. --- programs/winedbg/hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/programs/winedbg/hash.c b/programs/winedbg/hash.c index c86ff660c40..00ad4d10131 100644 --- a/programs/winedbg/hash.c +++ b/programs/winedbg/hash.c @@ -712,10 +712,10 @@ const char * DEBUG_FindNearestSymbol( const DBG_ADDR *addr, int flag, module = DEBUG_FindModuleByAddr((void*)DEBUG_ToLinear(addr), DMT_UNKNOWN); if (module) { - char* ptr = strrchr(module->module_name, '/'); - - if (!ptr++) ptr = module->module_name; - snprintf( modbuf, sizeof(modbuf), " in %s", ptr); + char *p, *name = module->module_name; + if ((p = strrchr(name, '/'))) name = p + 1; + if ((p = strrchr(name, '\\'))) name = p + 1; + snprintf( modbuf, sizeof(modbuf), " in %s", name); } else modbuf[0] = '\0';