From d6bbdc7db3af336c4d18fccf17eba52d67dbe20e Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 4 Dec 2017 22:00:08 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_nativeDEX.c | 1 + iguana/exchanges/LP_stats.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_nativeDEX.c b/iguana/exchanges/LP_nativeDEX.c index 19ee06ace..a7e11ec6c 100644 --- a/iguana/exchanges/LP_nativeDEX.c +++ b/iguana/exchanges/LP_nativeDEX.c @@ -26,6 +26,7 @@ // portfolio value based on ask? // // else claim path +// swap memleak? // dPoW security -> 4: KMD notarized, 5: BTC notarized, after next notary elections // bigendian architectures need to use little endian for sighash calcs // improve critical section detection when parallel trades diff --git a/iguana/exchanges/LP_stats.c b/iguana/exchanges/LP_stats.c index 06d072285..ec89aa8cf 100644 --- a/iguana/exchanges/LP_stats.c +++ b/iguana/exchanges/LP_stats.c @@ -803,8 +803,9 @@ cJSON *LP_ohlc_json(struct LP_ohlc *bar,struct LP_ohlc *prevbar) memset(&tmp,0,sizeof(tmp)); if ( bar->numtrades == 0 ) { - tmp = *prevbar; + memset(&tmp,0,sizeof(tmp)); tmp.timestamp = bar->timestamp; + tmp.close = bar->close; tmp.numtrades = 0; tmp.relsum = tmp.basesum = 0.; } else tmp = *bar;