I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug, found using PVS-Studio.
Your code has wrong keycodes checking while keylogging.
For example, if user presses comma [,] on numpad, it will log as user pressed minus [-].
And if user presses equal sign [=], it will log as user pressed semicolon [:].
I have corrected keycodes.
V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 121, 123. keylogger.cpp 121
V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 109, 111. keylogger.cpp 109
I'm a member of the Pinguem.ru competition on finding errors in open source projects. A bug, found using PVS-Studio.
Your code has wrong keycodes checking while keylogging. For example, if user presses comma [,] on numpad, it will log as user pressed minus [-]. And if user presses equal sign [=], it will log as user pressed semicolon [:]. I have corrected keycodes.
V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 121, 123. keylogger.cpp 121 V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 109, 111. keylogger.cpp 109