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;