aboutsummaryrefslogtreecommitdiffstats
path: root/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils.c')
-rwxr-xr-xutils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index b73e4fcdb..e83d86fca 100755
--- a/utils.c
+++ b/utils.c
@@ -420,8 +420,10 @@ int ast_wait_for_input(int fd, int ms)
void ast_copy_string(char *dst, const char *src, size_t size)
{
- while (*src && size--)
+ while (*src && size) {
*dst++ = *src++;
+ size--;
+ }
if (__builtin_expect(!size, 0))
dst--;
*dst = '\0';