diff options
author | Harry Jeffery <harry@exec64.co.uk> | 2015-11-28 01:09:33 +0000 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2015-11-28 01:09:33 +0000 |
commit | 3fa5a6a554c55afc64115ba923a2d7cfe8601cc1 (patch) | |
tree | 68c6e94383cdd21cac8c3063624aefa0ed24fa4c /src/navigator.c | |
parent | 535676a6e08e5698c1855b44bf82922712fb186c (diff) | |
download | imv-3fa5a6a554c55afc64115ba923a2d7cfe8601cc1.tar.gz |
Fix memory corruption bug in imv_navigator_remove_path
Diffstat (limited to 'src/navigator.c')
-rw-r--r-- | src/navigator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/navigator.c b/src/navigator.c index 290c764..a4aa4eb 100644 --- a/src/navigator.c +++ b/src/navigator.c @@ -159,7 +159,7 @@ void imv_navigator_remove_path(struct imv_navigator *nav, const char *path) return; } - for(int i = removed; i < nav->num_paths - 2; ++i) { + for(int i = removed; i < nav->num_paths - 1; ++i) { nav->paths[i] = nav->paths[i+1]; } @@ -177,6 +177,7 @@ void imv_navigator_remove_path(struct imv_navigator *nav, const char *path) } } } + nav->changed = 1; } void imv_navigator_remove_current_path(struct imv_navigator *nav) |