Changeset 2771 for trunk/src/kmk/expand.c
- Timestamp:
- Feb 1, 2015, 9:48:36 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk/expand.c
r2770 r2771 190 190 #else /* CONFIG_WITH_VALUE_LENGTH */ 191 191 if (!v->append) 192 value = allocated_variable_expand_2 (v->value, v->value_length, value_lenp); 192 { 193 if (!IS_VARIABLE_RECURSIVE_WITHOUT_DOLLAR (v)) 194 value = allocated_variable_expand_2 (v->value, v->value_length, value_lenp); 195 else 196 { 197 unsigned int len = v->value_length; 198 value = xmalloc (len + 2); 199 memcpy (value, v->value, len + 1); 200 value[len + 1] = '\0'; /* Extra terminator like allocated_variable_expand_2 returns. Why? */ 201 if (value_lenp) 202 *value_lenp = len; 203 } 204 } 193 205 else 194 206 { … … 312 324 #ifdef CONFIG_WITH_VALUE_LENGTH 313 325 assert (v->value_length == strlen (v->value)); 314 if (!v->recursive )326 if (!v->recursive || IS_VARIABLE_RECURSIVE_WITHOUT_DOLLAR (v)) 315 327 o = variable_buffer_output (o, v->value, v->value_length); 316 328 else … … 1010 1022 1011 1023 /* Either expand it or copy it, depending. */ 1012 if (! v->recursive )1024 if (! v->recursive || IS_VARIABLE_RECURSIVE_WITHOUT_DOLLAR (v)) 1013 1025 #ifdef CONFIG_WITH_VALUE_LENGTH 1014 1026 return variable_buffer_output (buf, v->value, v->value_length);
Note:
See TracChangeset
for help on using the changeset viewer.