Skip to content

Commit e11c0ec

Browse files
committed
don't execute system when only return is pressed.
1 parent 8e6fc15 commit e11c0ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
7070

7171
message[bytes] = '\0';
7272
printf("%s", message+1);
73-
if(message[0] == 'c')//command
73+
if(message[0] == 'c' && strlen(message+1))//command
7474
system(message+1);
7575
}
7676

0 commit comments

Comments
 (0)