aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vis.c b/vis.c
index f1ad06f..1648fa4 100644
--- a/vis.c
+++ b/vis.c
@@ -1759,7 +1759,7 @@ static const char *file_open_dialog(const char *pattern) {
if (len >= sizeof(filename))
len = 0;
if (len > 0)
- text_bytes_get(txt, 0, len-1, filename);
+ text_bytes_get(txt, 0, --len, filename);
filename[len] = '\0';
}