Skip to content

Commit

Permalink
Fix lockup on Windows in completioncell
Browse files Browse the repository at this point in the history
Missed updating an 'if' clause which resulted in a negative offset for
previous character.
  • Loading branch information
Bob-IT committed Jun 13, 2023
1 parent 38118a2 commit 853791c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnucash/register/register-gnome/completioncell-gnome.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ test_and_add (PopBox* box, const gchar *text, gint start_pos,

match = g_utf8_substring (text, found_location, found_location + newval_length);

if (found_location >= 1)
if (found_location - start_pos >= 1)
{
gunichar prev = g_utf8_get_char (g_utf8_offset_to_pointer (sub_text, found_location - start_pos - 1));
if (prev && (g_unichar_isspace (prev) || g_unichar_ispunct (prev)))
Expand Down

0 comments on commit 853791c

Please sign in to comment.