Skip to content
Snippets Groups Projects
Commit ce9d86a2 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

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

parent 3cfa89c3
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment