argc and argv may be zero (which means to ignore them)

pull/1/head
dscho 20 years ago
parent e78a41c69c
commit b7dae538f6

@ -188,6 +188,11 @@ static rfbBool rfbInitConnection(rfbClient* client)
rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) {
int i,j;
if(argv==0 || argc==0 || *argc==0) {
client->programName="";
client->serverHost="";
client->serverPort=5900;
} else {
if(client->programName==0)
client->programName=argv[0];
@ -222,6 +227,7 @@ rfbBool rfbInitClient(rfbClient* client,int* argc,char** argv) {
i--;
}
}
}
if(!rfbInitConnection(client)) {
rfbClientCleanup(client);

Loading…
Cancel
Save