Commit ada77ebc authored by Simon Wüllhorst's avatar Simon Wüllhorst

propper stdin reading

parent 6d7457f0
......@@ -402,10 +402,12 @@ void handle_stdin(game_peers_info* peers_info)
{
int column;
char inbuf[BUFFER_SIZE];
memset(inbuf, 0, sizeof(inbuf));
ssize_t len;
len = Read(STDIN_FILENO, (void*)inbuf, BUFFER_SIZE);
if (len == 0)
printf("len: %zd ", len);
if (len <= 1)
return;
//special commands
switch (*inbuf) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment