mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-12 10:53:23 +03:00
Ticket #3698: fix mcedit codejump (etags filenames parsing)
This got broken in the following commit for mc-4.8.16: a5ebb7d6199ae41cb71743bd2a2f4197b973dad6 As `g_strlcpy` got replaced with `g_strndup`, the meaning of the last argument has changed: it is no longer the destination size in bytes, but the maximum number of bytes to copy, and so it had to be decremented by one accordingly, hence the bug. Signed-off-by: Roman Mikhayloff <rimf@inbox.ru> Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
This commit is contained in:
parent
2c576fad94
commit
224f53518e
@ -214,7 +214,7 @@ etags_set_definition_hash (const char *tagfile, const char *start_path,
|
||||
|
||||
pos = strcspn (buf, ",");
|
||||
g_free (filename);
|
||||
filename = g_strndup (buf, pos + 1);
|
||||
filename = g_strndup (buf, pos);
|
||||
state = in_define;
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user