mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-08 07:33:53 +01:00
gskill: Update checksum *after* updating profile name
Noticed this while adding support for profile commits. This is definitely a bug. Signed-off-by: Lyude <thatslyude@gmail.com>
This commit is contained in:
@@ -571,8 +571,6 @@ gskill_do_write_profile(struct ratbag_device *device,
|
||||
uint8_t *buf = (uint8_t*)report;
|
||||
int rc;
|
||||
|
||||
report->checksum = gskill_calculate_checksum(buf, sizeof(*report));
|
||||
|
||||
/*
|
||||
* The G.Skill configuration software doesn't take kindly to blank
|
||||
* profile names, so ensure we have one
|
||||
@@ -589,6 +587,8 @@ gskill_do_write_profile(struct ratbag_device *device,
|
||||
return rc;
|
||||
}
|
||||
|
||||
report->checksum = gskill_calculate_checksum(buf, sizeof(*report));
|
||||
|
||||
rc = gskill_select_profile(device, report->profile_num, true);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
Reference in New Issue
Block a user