diff --git a/lib/com_err/compile_et.c b/lib/com_err/compile_et.c index 500663af9..199ef94be 100644 --- a/lib/com_err/compile_et.c +++ b/lib/com_err/compile_et.c @@ -221,8 +221,16 @@ main(int argc, char **argv) p = strrchr(filename, '/'); #ifdef BACKSLASH_PATH_DELIM - if (!p) - p = strrchr(filename, '\\'); + { + char * bs = strrchr(filename, '\\'); + + if (p) { + if (p < bs) + p = bs; + } else { + p = bs; + } + } #endif if(p) p++;