aboutsummaryrefslogtreecommitdiffstats
path: root/main/ast_expr2f.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-27 22:28:46 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2006-12-27 22:28:46 +0000
commita6d5aa22b9633ec86933ff844bfbf86c5a6b9dd5 (patch)
treecc738f899bd37d3d4bf83436b87030f4ea37002c /main/ast_expr2f.c
parentbec31308c06801ff6170b9bdbed27cb7c3dcfb9c (diff)
ast_copy_string is not available when LOW_MEMORY is used and things are being built in the utils directory, so we need to resort to the old method of strncpy. (issue #8579 reported by mottano)
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@49009 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/ast_expr2f.c')
-rw-r--r--main/ast_expr2f.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/ast_expr2f.c b/main/ast_expr2f.c
index 3693e4842..eb4691dc4 100644
--- a/main/ast_expr2f.c
+++ b/main/ast_expr2f.c
@@ -3134,11 +3134,11 @@ int ast_expr(char *expr, char *buf, int length)
res_length = snprintf(buf, length, "%ld", (long int) io.val->u.i);
return_value = (res_length <= length) ? res_length : length;
} else {
-#ifdef STANDALONE
+#if defined(STANDALONE) || defined(LOW_MEMORY)
strncpy(buf, io.val->u.s, length - 1);
-#else /* !STANDALONE */
+#else /* !STANDALONE && !LOW_MEMORY */
ast_copy_string(buf, io.val->u.s, length);
-#endif /* STANDALONE */
+#endif /* STANDALONE || LOW_MEMORY */
return_value = strlen(buf);
free(io.val->u.s);
}