From 2543a0ef3c9dbf1f14f5c4d41292a6559bc4b25d Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 24 Jan 2018 14:07:54 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_commands.c | 4 ++-- iguana/exchanges/LP_privkey.c | 14 +++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/iguana/exchanges/LP_commands.c b/iguana/exchanges/LP_commands.c index 0427210b4..c9140dea9 100644 --- a/iguana/exchanges/LP_commands.c +++ b/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 ) { diff --git a/iguana/exchanges/LP_privkey.c b/iguana/exchanges/LP_privkey.c index 2b251174b..b546fbc55 100644 --- a/iguana/exchanges/LP_privkey.c +++ b/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 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 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++; }