gcontini
2019-11-30 f70b62c23fc0818c1e84b297cf4f3917b95b9d14
src/library/LicenseReader.cpp
@@ -54,6 +54,8 @@
   }
   bool atLeastOneLicenseComplete = false;
   const string product_up = toupper_copy(product);
   const char *productNamePtr = product_up.c_str();
   for (unique_ptr<locate::LocatorStrategy> &locator : locator_strategies) {
      vector<string> licenseLocations = locator->license_locations(eventRegistry);
      if (licenseLocations.size() == 0) {
@@ -68,7 +70,6 @@
            eventRegistry.addEvent(FILE_FORMAT_NOT_RECOGNIZED, *it);
            continue;
         }
         const char *productNamePtr = product.c_str();
         const int sectionSize = ini.GetSectionSize(productNamePtr);
         if (sectionSize <= 0) {
            eventRegistry.addEvent(PRODUCT_NOT_LICENSED, *it);
@@ -85,8 +86,8 @@
          *  sig = XXXXXXXXXX (mandatory, 1024)
          *  application_data = xxxxxxxxx (optional string 16)
          */
         const char *license_signature = ini.GetValue(productNamePtr, "sig", nullptr);
         long license_version = ini.GetLongValue(productNamePtr, "lic_ver", -1);
         const char *license_signature = ini.GetValue(productNamePtr, LICENSE_SIGNATURE, nullptr);
         long license_version = ini.GetLongValue(productNamePtr, LICENSE_VERSION, -1);
         if (license_signature != nullptr && license_version == 200) {
            CSimpleIniA::TNamesDepend keys;
            ini.GetAllKeys(productNamePtr, keys);