vial/encoder: fix memory corruption in exec_keycode
get_record_keycode calls into update_source_layers_cache which corrupts
memory because our magic row/col isn't present in the matrix
based on drashna code in ed6153062f/users/drashna/encoder_stuff.c
This commit is contained in:
@ -179,12 +179,14 @@ void post_process_record_quantum(keyrecord_t *record) {
|
||||
post_process_record_kb(keycode, record);
|
||||
}
|
||||
|
||||
bool process_record_quantum(keyrecord_t *record) {
|
||||
uint16_t keycode = get_record_keycode(record, true);
|
||||
return process_record_quantum_helper(keycode, record);
|
||||
}
|
||||
/* Core keycode function, hands off handling to other functions,
|
||||
then processes internal quantum keycodes, and then processes
|
||||
ACTIONs. */
|
||||
bool process_record_quantum(keyrecord_t *record) {
|
||||
uint16_t keycode = get_record_keycode(record, true);
|
||||
|
||||
bool process_record_quantum_helper(uint16_t keycode, keyrecord_t *record) {
|
||||
// This is how you use actions here
|
||||
// if (keycode == KC_LEAD) {
|
||||
// action_t action;
|
||||
|
Reference in New Issue
Block a user