summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Build/source/texk/xdvik/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Build/source/texk/xdvik/main.c b/Build/source/texk/xdvik/main.c
index 407c2af4eeb..87e92fd06c9 100644
--- a/Build/source/texk/xdvik/main.c
+++ b/Build/source/texk/xdvik/main.c
@@ -457,7 +457,7 @@ is_good_dvi_file(const char *filename, Boolean from_history)
/* REALPATH failed, use real_filename */
size_t n = strlen(real_filename);
if (n >= MAXPATHLEN) {
- n = MAXPATHLEN;
+ n = MAXPATHLEN - 1;
}
memcpy(canonical_path, real_filename, n);