summaryrefslogtreecommitdiff
path: root/funcs/func_env.c
diff options
context:
space:
mode:
Diffstat (limited to 'funcs/func_env.c')
-rw-r--r--funcs/func_env.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/funcs/func_env.c b/funcs/func_env.c
index 26bd09c13..3c260a2fb 100644
--- a/funcs/func_env.c
+++ b/funcs/func_env.c
@@ -725,7 +725,7 @@ static int file_read(struct ast_channel *chan, const char *cmd, char *data, stru
}
}
ast_debug(3, "length_offset=%" PRId64 ", length_offset - i=%" PRId64 "\n", length_offset, length_offset - i);
- ast_str_append_substr(buf, len, fbuf, length_offset >= 0 ? length_offset - i : flength > i + sizeof(fbuf)) ? sizeof(fbuf) : flength - i;
+ ast_str_append_substr(buf, len, fbuf, (length_offset >= 0) ? length_offset - i : (flength > i + sizeof(fbuf)) ? sizeof(fbuf) : flength - i);
if (length_offset >= 0) {
break;