|
@ -27,7 +27,7 @@ int32_t iguana_scriptdata(struct iguana_info *coin,uint8_t *scriptspace,uint64_t |
|
|
int32_t iguana_scriptdata(struct iguana_info *coin, uint8_t *scriptspace, long fileptr[2], char *fname, uint64_t scriptpos, int32_t scriptlen) |
|
|
int32_t iguana_scriptdata(struct iguana_info *coin, uint8_t *scriptspace, long fileptr[2], char *fname, uint64_t scriptpos, int32_t scriptlen) |
|
|
#endif |
|
|
#endif |
|
|
{ |
|
|
{ |
|
|
FILE *fp; long err; int32_t retval = scriptlen; |
|
|
FILE *fp; long err; uint8_t *ptr; int32_t i,retval = scriptlen; |
|
|
#ifndef __PNACL__ |
|
|
#ifndef __PNACL__ |
|
|
if ( scriptpos < 0xffffffff ) |
|
|
if ( scriptpos < 0xffffffff ) |
|
|
{ |
|
|
{ |
|
@ -41,7 +41,10 @@ int32_t iguana_scriptdata(struct iguana_info *coin, uint8_t *scriptspace, long f |
|
|
{ |
|
|
{ |
|
|
if ( (scriptpos + scriptlen) <= fileptr[1] ) |
|
|
if ( (scriptpos + scriptlen) <= fileptr[1] ) |
|
|
{ |
|
|
{ |
|
|
memcpy(scriptspace,(void *)(fileptr[0] + (uint32_t)scriptpos),scriptlen); |
|
|
ptr = (void *)(fileptr[0] + (uint32_t)scriptpos); |
|
|
|
|
|
//memcpy(scriptspace,ptr,scriptlen);
|
|
|
|
|
|
for (i=0; i<scriptlen; i++) |
|
|
|
|
|
scriptspace[i] = ptr[i]; |
|
|
return(retval); |
|
|
return(retval); |
|
|
} |
|
|
} |
|
|
else if ( (0) ) |
|
|
else if ( (0) ) |
|
|