Permalink
Browse files

Fix typo in 01_rot13_server_select.c

Erroneously resetting n_written and buffer_used back to 1 would
leave a gap at the beginning of the buffer, filled with the very
first character that was received.
  • Loading branch information...
1 parent 3aacef9 commit 8005f746879a1437e26d338f6c3c1c854428f365 @rosslagerwall committed Sep 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 examples_01/01_rot13_server_select.c
@@ -110,7 +110,7 @@ do_write(int fd, struct fd_state *state)
}
if (state->n_written == state->buffer_used)
- state->n_written = state->write_upto = state->buffer_used = 1;
+ state->n_written = state->write_upto = state->buffer_used = 0;
state->writing = 0;

0 comments on commit 8005f74

Please sign in to comment.