mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2024-12-18 10:51:54 +03:00
Correcting bug on DEL and DELETE
This commit is contained in:
parent
905273e066
commit
cd14380dba
@ -97,7 +97,7 @@ static uint32_t mj_ducky_get_command_len(const char* line) {
|
|||||||
static bool mj_get_ducky_key(char* key, size_t keylen, MJDuckyKey* dk) {
|
static bool mj_get_ducky_key(char* key, size_t keylen, MJDuckyKey* dk) {
|
||||||
//FURI_LOG_D(TAG, "looking up key %s with length %d", key, keylen);
|
//FURI_LOG_D(TAG, "looking up key %s with length %d", key, keylen);
|
||||||
for(uint i = 0; i < sizeof(mj_ducky_keys) / sizeof(MJDuckyKey); i++) {
|
for(uint i = 0; i < sizeof(mj_ducky_keys) / sizeof(MJDuckyKey); i++) {
|
||||||
if(strncmp(mj_ducky_keys[i].name, key, keylen) == 0) {
|
if(strlen(mj_ducky_keys[i].name) == keylen && !strncmp(mj_ducky_keys[i].name, key, keylen)) {
|
||||||
memcpy(dk, &mj_ducky_keys[i], sizeof(MJDuckyKey));
|
memcpy(dk, &mj_ducky_keys[i], sizeof(MJDuckyKey));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user