From 4730615cb2087183dfb6ef474068b906114c09ba Mon Sep 17 00:00:00 2001 From: Rohit Grover Date: Tue, 2 Jun 2015 08:56:47 +0100 Subject: [PATCH] don't memset(0) the discovered Characteristics or Services in reset*(); that destroys the pointer to virtual tables --- btle/btle_discovery.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/btle/btle_discovery.h b/btle/btle_discovery.h index 529099a..44d79dc 100644 --- a/btle/btle_discovery.h +++ b/btle/btle_discovery.h @@ -86,13 +86,11 @@ private: void resetDiscoveredServices(void) { numServices = 0; serviceIndex = 0; - memset(services, 0, sizeof(DiscoveredService) * BLE_DB_DISCOVERY_MAX_SRV); } void resetDiscoveredCharacteristics(void) { numCharacteristics = 0; characteristicIndex = 0; - memset(characteristics, 0, sizeof(DiscoveredCharacteristic) * BLE_DB_DISCOVERY_MAX_CHAR_PER_SRV); } public: