diff --git a/blkmaker_jansson.c b/blkmaker_jansson.c index 299045f..14e80c9 100644 --- a/blkmaker_jansson.c +++ b/blkmaker_jansson.c @@ -319,7 +319,8 @@ void my_bin2hex(char *out, const void *data, size_t datasz) { json_t *blkmk_submit_jansson(blktemplate_t *tmpl, const unsigned char *data, unsigned int dataid, blknonce_t nonce) { unsigned char blk[80 + 8 + 1000000]; memcpy(blk, data, 76); - *(uint32_t*)(&blk[76]) = htonl(nonce); + nonce = htonl(nonce); + memcpy(&blk[76], &nonce, 4); size_t offs = 80; if (!(tmpl->mutations & BMAb_TRUNCATE && !dataid))