encoding bug

diff --git a/skeletons/INTEGER.c b/skeletons/INTEGER.c
index e9f61ac..3643465 100644
--- a/skeletons/INTEGER.c
+++ b/skeletons/INTEGER.c
@@ -598,6 +598,7 @@
 			_ASN_ENCODE_FAILED;
 		if(per_put_many_bits(po, buf, 8 * mayEncode))
 			_ASN_ENCODE_FAILED;
+		buf += mayEncode;
 	}
 
 	_ASN_ENCODED_OK(er);