Fix for only specifying one command with -c
authorTim Potter <tpot@samba.org>
Fri, 21 Feb 2003 04:25:04 +0000 (04:25 +0000)
committerTim Potter <tpot@samba.org>
Fri, 21 Feb 2003 04:25:04 +0000 (04:25 +0000)
source/rpcclient/rpcclient.c

index 37ce597d4ecffc7583610474bba1d0fca6b4447e..7a9c464cf6a955e7b63632eef68e77beeca54be3 100644 (file)
@@ -170,7 +170,10 @@ static char* next_command (char** cmdstr)
        if (p)
                *p = '\0';
        pstrcpy(command, *cmdstr);
-       *cmdstr = p + 1;
+       if (p)
+               *cmdstr = p + 1;
+       else
+               *cmdstr = NULL;
        
        return command;
 }