1
0
forked from drath/libratbag

gskill: Check for ret < 0 in gskill_read_profile_name()

This was only working before because we weren't actually returning the
profile size correctly. Fix that up as well.
This commit is contained in:
Lyude
2016-10-13 13:29:06 -04:00
committed by Peter Hutterer
parent 107d7e652f
commit 2b63ca4935

View File

@@ -1072,7 +1072,7 @@ gskill_read_profile_name(struct ratbag_device *device,
ret = ratbag_utf8_from_enc(report->name, sizeof(report->name),
"UTF-16LE", &name);
if (ret) {
if (ret < 0) {
log_debug(device->ratbag,
"Couldn't read profile name? Error %d\n", ret);
return;