Merged revisions 49237 via svnmerge from
[asterisk/asterisk.git] / main / ast_expr2.fl
index 58c5228..8f156e8 100644 (file)
@@ -241,11 +241,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);
                }