jl777 7 years ago
parent
commit
2543a0ef3c
  1. 4
      iguana/exchanges/LP_commands.c
  2. 14
      iguana/exchanges/LP_privkey.c

4
iguana/exchanges/LP_commands.c

@ -161,7 +161,7 @@ bot_stop(botid)\n\
bot_pause(botid)\n\
instantdex_deposit(weeks, amount, broadcast=1)\n\
instantdex_claim()\n\
jpg(srcfile, destfile, power2=7, passphrase, data="", required)\n\
jpg(srcfile, destfile, power2=7, password, data="", required)\n\
\"}"));
//sell(base, rel, price, basevolume, timeout=10, duration=3600)\n\
@ -240,7 +240,7 @@ jpg(srcfile, destfile, power2=7, passphrase, data="", required)\n\
}
else if ( strcmp(method,"jpg") == 0 )
{
return(LP_jpg(jstr(argjson,"srcfile"),jstr(argjson,"destfile"),jint(argjson,"power2"),jstr(argjson,"passphrase"),jstr(argjson,"data"),jint(argjson,"required")));
return(LP_jpg(jstr(argjson,"srcfile"),jstr(argjson,"destfile"),jint(argjson,"power2"),jstr(argjson,"password"),jstr(argjson,"data"),jint(argjson,"required")));
}
/*else if ( strcmp(method,"sendmessage") == 0 )
{

14
iguana/exchanges/LP_privkey.c

@ -482,10 +482,14 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin
for (i=0; i<DCTSIZE2; i++)
{
val = row_ptrs[compnum][0][blocknum][i];
if ( val < -limit || val > limit )
if ( val < -8 || val > 8 )
{
if ( decoded != 0 && (val & 1) != 0 && *capacityp < required )
decoded[*capacityp >> 3] |= (1 << (*capacityp & 7));
if ( *capacityp < required )
{
if ( (val & 1) != 0 )
decoded[*capacityp >> 3] |= (1 << (*capacityp&7));
else decoded[(*capacityp) >> 3] &= ~(1 << (*capacityp&7));
}
(*capacityp)++;
}
coef_buffers[compnum][rownum][blocknum][i] = val;
@ -515,10 +519,10 @@ int32_t LP_jpg_process(int32_t *capacityp,char *inputfname,char *outputfname,uin
for (i=0; i<DCTSIZE2; i++)
{
val = coef_buffers[compnum][rownum][blocknum][i];
if ( val < -limit || val > limit )
if ( val < -8 || val > 8 )
{
val &= ~1;
if ( (data[emit >> 3] & (1 << (emit&7))) != 0 )
if ( (emit < required && (data[emit >> 3] & (1 << (emit&7))) != 0) || (rand() & 1) != 0 )
val |= 1;
emit++;
}

Loading…
Cancel
Save