summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/file.c b/file.c
index b358c526b4..96ecb7edf3 100644
--- a/file.c
+++ b/file.c
@@ -1554,6 +1554,7 @@ rb_file_s_expand_path(argc, argv)
#endif
if (tainted) OBJ_TAINT(result);
+ *p = '\0';
RSTRING(result)->len = p - buf;
return result;
}