Check for directory separator `\' in program name, by JR Heisey

This commit is contained in:
Hallvard Furuseth 1999-03-09 05:53:21 +00:00
parent 3cfa89c3d1
commit ce9d86a278

View File

@ -95,7 +95,8 @@ main( int argc, char **argv )
FILE *fp;
int rc, i, use_ldif, authmethod, version, want_bindpw, debug;
if (( prog = strrchr( argv[ 0 ], '/' )) == NULL ) {
if (( prog = strrchr( argv[ 0 ], '/' )) == NULL &&
( prog = strrchr( argv[ 0 ], '\\' )) == NULL ) { // for Windows/DOS
prog = argv[ 0 ];
} else {
++prog;