]> git.mdlowis.com Git - proto/labwc.git/commitdiff
desktop-entry: fix partial string matching
authorMarvin Dostal <maffinmaffinmaffinmaffin@gmail.com>
Sat, 16 Aug 2025 10:31:45 +0000 (12:31 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 20 Aug 2025 20:15:35 +0000 (21:15 +0100)
Use the base instead of the full string for the comparison.

src/desktop-entry.c

index 6fc842a82460a3cd8142f167cfa7de9492736bd0..b21df3bc8d2b6aaf52a3db42368fdad2299d0d9b 100644 (file)
@@ -268,7 +268,7 @@ get_db_entry_by_id_fuzzy(struct sfdo_desktop_db *db, const char *app_id)
                int alen = strlen(app_id);
                int dlen = strlen(desktop_id_base);
 
-               if (!strncasecmp(app_id, desktop_id, alen > dlen ? dlen : alen)) {
+               if (!strncasecmp(app_id, desktop_id_base, alen > dlen ? dlen : alen)) {
                        return entry;
                }
        }