Browse Source

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

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

+ 1 - 1
miner.c

@@ -1456,7 +1456,7 @@ static bool work_decode(const json_t *val, struct work *work)
 			goto err_out;
 		}
 		blkmk_get_data(work->tmpl, work->data, 80, time(NULL), NULL);
-		swap32yes(work->data, work->data, 80);
+		swap32yes(work->data, work->data, 80 / 4);
 		memcpy(&work->data[80], "\0\0\0\x80\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x80\x02\0\0", 48);
 	}
 	else