Merged revisions 49237 via svnmerge from
[asterisk/asterisk.git] / main / ast_expr2f.c
index 3fec4a2..b0e6945 100644 (file)
@@ -3122,11 +3122,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);
                }