From ac7ea79c330d9684e39cb41ef528a1c44eb13616 Mon Sep 17 00:00:00 2001 From: gcontini <1121667+gcontini@users.noreply.github.com> Date: 周六, 30 11月 2019 16:20:10 +0800 Subject: [PATCH] update install targets --- src/library/LicenseReader.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/library/LicenseReader.cpp b/src/library/LicenseReader.cpp index 0bb9262..9aa53ab 100644 --- a/src/library/LicenseReader.cpp +++ b/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); -- Gitblit v1.9.1