summaryrefslogtreecommitdiff
path: root/cipher/arcfour.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/arcfour.c')
-rw-r--r--cipher/arcfour.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cipher/arcfour.c b/cipher/arcfour.c
index dec465eb..66017b08 100644
--- a/cipher/arcfour.c
+++ b/cipher/arcfour.c
@@ -63,7 +63,8 @@ do_encrypt_stream( ARCFOUR_context *ctx,
while ( length-- )
{
- i = ++i & 255; /* and seems to faster than mod */
+ i++;
+ i = i & 255; /* and seems to be faster than mod */
j += sbox[i];
j &= 255;
t = sbox[i]; sbox[i] = sbox[j]; sbox[j] = t;