]> granicus.if.org Git - graphviz/commitdiff
Fix Windows code to only remove .exe if it exists. Apparently,
authorerg <devnull@localhost>
Thu, 12 Oct 2006 23:10:20 +0000 (23:10 +0000)
committererg <devnull@localhost>
Thu, 12 Oct 2006 23:10:20 +0000 (23:10 +0000)
versions can now have argv[0] with no trailing .exe.

lib/common/input.c

index c0b5beac963e2128f9dfbef4867ac4aa14c5be11..9ed8564b832ad847dede7b2a9ba3efe2ccc8ceca 100644 (file)
@@ -134,7 +134,7 @@ static char* dotneato_basename (char* path)
      */
     {
        char* dotp = strrchr (s, '.');
-       if (dotp) *dotp = '\0';
+       if (dotp && !strcmp(dotp+1,"exe")) *dotp = '\0';
     }
 #endif
     while (*s) s++; s--;