Skip to content

Commit

Permalink
Fix wrong length when nuking whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
btrkeks committed May 8, 2024
1 parent 3987b03 commit cb2e4ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/dictpopup.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,9 @@ dictpopup_t dictpopup_init(int argc, char **argv) {
"Lookup is not a valid UTF-8 string");

if (cfg.general.nukeWhitespaceLookup)
nuke_whitespace(p.lookup);
p.lookup = nuke_whitespace(p.lookup);

assert(g_utf8_validate((char *)p.lookup.s, p.lookup.len, NULL));

return (dictpopup_t){p};
}

0 comments on commit cb2e4ff

Please sign in to comment.