Browse Source

expression: Fix infinite loop

pull/108/head
Daniel Scharrer 7 years ago
parent
commit
d8301f65aa
  1. 1
      CHANGELOG
  2. 4
      src/setup/expression.cpp
  3. 3
      src/setup/expression.hpp

1
CHANGELOG

@ -14,6 +14,7 @@ innoextract 1.8 (WIP)
- Fixed extracting files from slices larger than 2 GiB with 32-bit builds
- Fixed output path for files with absolute paths (canonicalization now strips all unsafe characters)
- Fixed output directory being created even when not extracting files
- Fixed a hang when using the --language option
- Changed header parsing to select the first version without warnings and failing that the first without errors
innoextract 1.7 (2018-06-12)

4
src/setup/expression.cpp

@ -125,7 +125,7 @@ struct evaluator {
bool result = eval_factor(lazy);
while(token == op_and) {
next();
result = result && eval_factor(lazy || !result);
result = eval_factor(lazy || !result) && result;
}
return result;
}
@ -136,7 +136,7 @@ struct evaluator {
if(token == op_or) {
next();
}
result = result || eval_term(lazy || result);
result = eval_term(lazy || result) || result;
}
return result;
}

3
src/setup/expression.hpp

@ -30,6 +30,9 @@
namespace setup {
/*
* Determine if the given expression is satisfied with (only) the given test variable set to true
*/
bool expression_match(const std::string & test, const std::string & expression);
bool is_simple_expression(const std::string & expression);

Loading…
Cancel
Save