Skip to content

Commit

Permalink
Fix typo in 01_rot13_server_select.c
Browse files Browse the repository at this point in the history
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
rosslagerwall committed Sep 5, 2012
1 parent 3aacef9 commit 8005f74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples_01/01_rot13_server_select.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8005f74

Please sign in to comment.