diff --git a/x86/arcfour-crypt.asm b/x86/arcfour-crypt.asm
index 7b2b2e67afe7dfe8f70a847c015c1d338d1e4354..6b99cc579560b946ccf1b9aac899979490164cf1 100644
--- a/x86/arcfour-crypt.asm
+++ b/x86/arcfour-crypt.asm
@@ -50,7 +50,8 @@ nettle_arcfour_crypt:
 	movzbl  256(%ebp), %eax		C  i
 	movzbl  257(%ebp), %ebx		C  j
 .Lloop:
-	incb	%al
+	incl	%eax
+	andl	$0xff, %eax
 	movzbl  (%ebp, %eax), %ecx	C  si. Clears high bytes
 	addb    %cl, %bl
 	movb    (%ebp, %ebx), %ch	C  sj