Commit fe61a86e0b73ec282be20673c696882d00067aea

Con Kolivas 2014-03-30T20:36:49

Fix getwork share submission

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/cgminer.c b/cgminer.c
index c48e7a7..8ad5a11 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -3189,13 +3189,12 @@ static bool submit_upstream_work(struct work *work, CURL *curl, bool resubmit)
 		} else
 			s = realloc_strcat(s, "\"]}");
 	} else {
-		unsigned char data[128];
 		char *hexstr;
 
-		endian_flip128(data, work->data);
+		endian_flip128(work->data, work->data);
 
 		/* build hex string */
-		hexstr = bin2hex(data, 128);
+		hexstr = bin2hex(work->data, 118);
 		s = strdup("{\"method\": \"getwork\", \"params\": [ \"");
 		s = realloc_strcat(s, hexstr);
 		s = realloc_strcat(s, "\" ], \"id\":1}");