Permalink
Browse files

Fix a bug in the rot13-bufferevent example.

Found by Radek Ryckowski.
  • Loading branch information...
1 parent 0d05618 commit 4e81d80822e73f8eecae4f5588d64a80ec66ab6b Nick Mathewson committed Feb 25, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 examples_01/01_rot13_server_bufferevent.c
@@ -59,7 +59,7 @@ readcb(struct bufferevent *bev, void *ctx)
while (evbuffer_get_length(input)) {
int n = evbuffer_remove(input, buf, sizeof(buf));
for (i = 0; i < n; ++i)
- line[i] = rot13_char(line[i]);
+ buf[i] = rot13_char(buf[i]);
evbuffer_add(output, buf, n);
}
evbuffer_add(output, "\n", 1);

0 comments on commit 4e81d80

Please sign in to comment.