diff options
Diffstat (limited to 'main/ast_expr2f.c')
-rw-r--r-- | main/ast_expr2f.c | 6 |
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); } |