Changeset 2276 for trunk/src


Ignore:
Timestamp:
Feb 24, 2009, 3:16:27 AM (16 years ago)
Author:
bird
Message:

kmk: Do not crash if $(if-expr ) is missing the 3rd argument, it is supposed to be optional... Fixes #85

File:
1 edited

Legend:

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

    r2172 r2276  
    42284228
    42294229  /* Evaluate the condition in argv[0] and expand the 2nd or
    4230      3rd argument according to the result. */
     4230     3rd (optional) argument according to the result. */
    42314231  rc = expr_eval_if_conditionals (argv[0], NULL);
    42324232  to_expand = rc == 0 ? argv[1] : argv[2];
    4233   if (*to_expand)
     4233  if (to_expand && *to_expand)
    42344234    variable_expand_string_2 (o, to_expand, -1, &o);
    42354235
Note: See TracChangeset for help on using the changeset viewer.