You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The README introduces a non-obfuscated example check_license() code and an obfuscated check_license1() code. Logically, generating a key based on the user name and then checking the license should always return 1:
const auto user_name = "obfy";
const auto generated_license = generate_license(user_name);
const auto is_license_valid = check_license1(user_name, generated_license.c_str());
std::cout << "License valid: " << is_license_valid << std::endl;
If I run this code it actually prints 0 using check_license1() but 1 using check_license() regardless of debug or release build. Shouldn't both functions behave idental? Why don't they?
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue, let me check the reason for this misbehaviour and I will get back to this thread when I have some conclusion why this happens.
I only had a brief look at the code but it seems refholder<T> rv(*this) only creates a shallow copy, the reference continues to point to the same underlying value so it will get mutated by operator++.
The
README
introduces a non-obfuscated examplecheck_license()
code and an obfuscatedcheck_license1()
code. Logically, generating a key based on the user name and then checking the license should always return1
:If I run this code it actually prints
0
usingcheck_license1()
but1
usingcheck_license()
regardless of debug or release build. Shouldn't both functions behave idental? Why don't they?The text was updated successfully, but these errors were encountered: