Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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...
commit 8005f746879a1437e26d338f6c3c1c854428f365 1 parent 3aacef9
Ross Lagerwall rosslagerwall authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  examples_01/01_rot13_server_select.c
2  examples_01/01_rot13_server_select.c
@@ -110,7 +110,7 @@ do_write(int fd, struct fd_state *state)
110 110 }
111 111
112 112 if (state->n_written == state->buffer_used)
113   - state->n_written = state->write_upto = state->buffer_used = 1;
  113 + state->n_written = state->write_upto = state->buffer_used = 0;
114 114
115 115 state->writing = 0;
116 116

0 comments on commit 8005f74

Please sign in to comment.
Something went wrong with that request. Please try again.