[wesnoth-commits] [wesnoth/wesnoth] 4ab25c: Fix parser crash in defined multi line str test

Lovens Weche noreply at github.com
Thu Feb 28 15:24:24 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 4ab25cf0394b79d7288d3072b1a8537233d4afb7
      https://github.com/wesnoth/wesnoth/commit/4ab25cf0394b79d7288d3072b1a8537233d4afb7
  Author: Lovens Weche <lweche159 at gmail.com>
  Date:   2019-02-25 (Mon, 25 Feb 2019)

  Changed paths:
    M data/tools/wesnoth/wmlparser3.py

  Log Message:
  -----------
  Fix parser crash in defined multi line str test

The problem is that if we have a "#define" directive followed with an
empty line ending with a newline character then the parser presumes the
value is the newline character instead of the actual value (which is
located on a subsequent line).

The solution is that when parsing an empty line, if "self.in_string" is
False and "self.temp_key_nodes" is not None then we ignore the line
instead of parsing it with the "parse_outside_strings" function.

Closes #3947


  Commit: 2b708d0bbecd633933523d876b49e15c5a3f0fef
      https://github.com/wesnoth/wesnoth/commit/2b708d0bbecd633933523d876b49e15c5a3f0fef
  Author: Lovens Weche <lweche159 at gmail.com>
  Date:   2019-02-28 (Thu, 28 Feb 2019)

  Changed paths:
    M data/tools/wesnoth/wmlparser3.py

  Log Message:
  -----------
  Merge pull request #3948 from LovCAPONE/def_multi_line_str_parser_test_fix

Fix parser crash in defined multi line str test


Compare: https://github.com/wesnoth/wesnoth/compare/3a564f7b21d2...2b708d0bbecd



More information about the Commits mailing list