Skip to content

Commit a70af93

Browse files
committed
no message
1 parent fb4a4a0 commit a70af93

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tool3/MainFrm.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,11 @@ VOID c(VOID *x)
173173
transaction.pubkeyScript[pubkeyScript_len - 1] = OP_CHECKSIG;
174174

175175
// Encode timestamp to binary
176-
transaction.scriptSig =(uint8_t *) malloc(scriptSig_len);
176+
transaction.scriptSig =(uint8_t *) malloc(8); //max size of first part
177177
uint32_t scriptSig_pos = 0;
178178

179+
/* nbits related stuff , first is real size of value in bytes , next is value with
180+
null bytes on the left removed */
179181
short pl;
180182
transaction.scriptSig[scriptSig_pos++] = pl = 0x01+((mount_tx->m_nb >> 8)>0)+((mount_tx->m_nb >> 16)>0)+((mount_tx->m_nb >> 24)>0); // statement (smth > 0) returns 0 or 1
181183
memcpy(transaction.scriptSig + scriptSig_pos, &mount_tx->m_nb, pl);

0 commit comments

Comments
 (0)