File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -173,9 +173,11 @@ VOID c(VOID *x)
173
173
transaction.pubkeyScript [pubkeyScript_len - 1 ] = OP_CHECKSIG;
174
174
175
175
// Encode timestamp to binary
176
- transaction.scriptSig =(uint8_t *) malloc (scriptSig_len);
176
+ transaction.scriptSig =(uint8_t *) malloc (8 ); // max size of first part
177
177
uint32_t scriptSig_pos = 0 ;
178
178
179
+ /* nbits related stuff , first is real size of value in bytes , next is value with
180
+ null bytes on the left removed */
179
181
short pl;
180
182
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
181
183
memcpy (transaction.scriptSig + scriptSig_pos, &mount_tx->m_nb , pl);
You can’t perform that action at this time.
0 commit comments