diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-03-22 14:30:26 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-03-24 07:31:36 +1000 |
commit | 80f2f7d9d33cdbd82471022e735d1b4fddd75e10 (patch) | |
tree | 12ba3898aafd96881e35abe7763f2e2c3f2f5e43 | |
parent | 06be3e84bd1bf7016a85d4aff5d7851b17d1b16d (diff) | |
download | libwacom-80f2f7d9d33cdbd82471022e735d1b4fddd75e10.tar.gz |
database: don't print the nullstring on a failed match
By the time we get to the DBG statement, string_list[i] is always NULL. This
makes the debugging message rather less useful than it could be.
Fix it by printing the full string instead, that's what we-re after.
Fixes #378
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | libwacom/libwacom-database.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libwacom/libwacom-database.c b/libwacom/libwacom-database.c index f8ba590..f338582 100644 --- a/libwacom/libwacom-database.c +++ b/libwacom/libwacom-database.c @@ -655,7 +655,9 @@ libwacom_parse_tablet_keyfile(WacomDeviceDatabase *db, first_valid_match = i; } if (nmatches == 0) { - DBG("failed to match '%s' for product/vendor IDs in '%s'\n", string_list[i], path); + DBG("failed to match '%s' for product/vendor IDs in '%s'\n", + g_key_file_get_string(keyfile, DEVICE_GROUP, "DeviceMatch", NULL), + path); g_strfreev (string_list); goto out; } |