Browse Source

Bugfix: swap32* wants count of 32-bit blocks, not bytes

Luke Dashjr 13 years ago
parent
commit
3b093c6626
1 changed files with 1 additions and 1 deletions
  1. 1 1
      miner.c

+ 1 - 1
miner.c

@@ -2101,7 +2101,7 @@ static bool submit_upstream_work(const struct work *work, CURL *curl, bool resub
 
 	if (work->tmpl) {
 		unsigned char data[76];
-		swap32yes(data, work->data, 76);
+		swap32yes(data, work->data, 76 / 4);
 		json_t *req = blkmk_submit_jansson(work->tmpl, data, work->dataid, *((uint32_t*)&work->data[76]));
 		s = json_dumps(req, 0);
 		sd = bin2hex(data, 80);