VirtualBox

Changeset 2426 in kBuild


Ignore:
Timestamp:
Nov 15, 2010 1:03:52 PM (14 years ago)
Author:
bird
Message:

kmk/read.c: Must adjust s1 after calling variable_expand_string_2 to produce s2 in conditonal_line. Fixes #98.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/read.c

    r2401 r2426  
    20942094      char termin = *line == '(' ? ',' : *line;
    20952095#ifdef CONFIG_WITH_VALUE_LENGTH
    2096       char *buf_pos;
     2096      char *s1_end, *s2_end;
    20972097#endif
    20982098
     
    21472147      memcpy (s1, s2, l + 1);
    21482148#else
    2149       s1 = variable_expand_string_2 (NULL, s1, l, &buf_pos);
    2150       ++buf_pos;
     2149      s1 = variable_expand_string_2 (NULL, s1, l, &s1_end);
    21512150#endif
    21522151
     
    21992198      s2 = variable_expand (s2);
    22002199#else
    2201       if ((size_t)buf_pos & 7)
    2202         buf_pos = variable_buffer_output (buf_pos, "\0\0\0\0\0\0\0\0",
    2203                                           8 - ((size_t)buf_pos & 7));
    2204       s2 = variable_expand_string_2 (buf_pos, s2, l, &buf_pos);
     2200      s2 = variable_expand_string_2 (s1_end + 1, s2, l, &s2_end);
     2201      if (s2 != s1_end + 1)
     2202        s1 += s2 - s1_end - 1;  /* the variable buffer was reallocated */
    22052203#endif
    22062204#ifdef CONFIG_WITH_SET_CONDITIONALS
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette