File src/engine/parsing.c changed (mode: 100644) (index 14778fe3f..9c8183155) |
... |
... |
eval_or_op(parse_context_t *ctx, int nops, expr_t ops[], var_t *result) |
349 |
349 |
return 0; |
return 0; |
350 |
350 |
} |
} |
351 |
351 |
|
|
352 |
|
/* Conversion to integer so that strings are converted into numbers instead of |
|
353 |
|
* checked to be empty. */ |
|
354 |
|
val = var_to_int(ops[0].value); |
|
|
352 |
|
/* TODO: replace with var_to_bool() when it's OK to change semantics of |
|
353 |
|
* strings by themselves. */ |
|
354 |
|
val = (var_to_int(ops[0].value) != 0); |
355 |
355 |
|
|
356 |
356 |
for(i = 1; i < nops && !val; ++i) |
for(i = 1; i < nops && !val; ++i) |
357 |
357 |
{ |
{ |
|
... |
... |
eval_or_op(parse_context_t *ctx, int nops, expr_t ops[], var_t *result) |
359 |
359 |
{ |
{ |
360 |
360 |
return 1; |
return 1; |
361 |
361 |
} |
} |
362 |
|
val |= var_to_int(ops[i].value); |
|
|
362 |
|
/* TODO: replace with var_to_bool() when it's OK to change semantics of |
|
363 |
|
* strings by themselves. */ |
|
364 |
|
val |= (var_to_int(ops[i].value) != 0); |
363 |
365 |
} |
} |
364 |
366 |
|
|
365 |
367 |
*result = var_from_bool(val); |
*result = var_from_bool(val); |