summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index 156b329f86..ad14138731 100644
--- a/file.c
+++ b/file.c
@@ -1275,7 +1275,7 @@ rb_file_s_readlink(klass, path)
SafeStringValue(path);
buf = xmalloc(size);
- if ((rv = readlink(RSTRING(path)->ptr, buf, size)) == size) {
+ while ((rv = readlink(RSTRING(path)->ptr, buf, size)) == size) {
size *= 2;
buf = xrealloc(buf, size);
}