[wesnoth-commits] [wesnoth/wesnoth] 1c123f: Allow '1-infinity' in ranges, and tighten the sche...

Steve Cotton noreply at github.com
Fri Aug 30 16:45:07 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 1c123fb3fa5b8a9dabd5d58278a9f849c99bcafa
      https://github.com/wesnoth/wesnoth/commit/1c123fb3fa5b8a9dabd5d58278a9f849c99bcafa
  Author: Steve Cotton <steve at octalot.co.uk>
  Date:   2019-08-29 (Thu, 29 Aug 2019)

  Changed paths:
    M changelog.md
    M data/ai/micro_ais/scenarios/recruiting.cfg
    M data/ai/micro_ais/scenarios/wolves.cfg
    M data/campaigns/An_Orcish_Incursion/scenarios/01_Defend_the_Forest.cfg
    M data/campaigns/Descent_Into_Darkness/scenarios/02_Peaceful_Valley.cfg
    M data/campaigns/Eastern_Invasion/scenarios/11_Captured.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter1/03_Kalian_under_Attack.cfg
    M data/campaigns/Legend_of_Wesmere/scenarios/chapter2/07_Elves_Last_Stand.cfg
    M data/campaigns/Legend_of_Wesmere/utils/map-utils.cfg
    M data/campaigns/Liberty/scenarios/08_Glory.cfg
    M data/campaigns/Secrets_of_the_Ancients/scenarios/04_Becalmed.cfg
    M data/campaigns/Secrets_of_the_Ancients/scenarios/06_Following_the_Shadow.cfg
    M data/campaigns/Secrets_of_the_Ancients/scenarios/08_Carcyn.cfg
    M data/campaigns/Secrets_of_the_Ancients/scenarios/10_Merfolk_Revenge.cfg
    M data/campaigns/Under_the_Burning_Suns/scenarios/06a_In_the_Tunnels_of_Trolls.cfg
    M data/core/macros/scenario-utils.cfg
    M data/core/macros/side-utils.cfg
    M data/schema/game_config.cfg
    M data/test/scenarios/store_locations.cfg
    M src/game_events/conditional_wml.cpp
    M src/map/location.cpp
    M src/serialization/string_utils.cpp
    M wml_test_schedule

  Log Message:
  -----------
  Allow '1-infinity' in ranges, and tighten the schema's validation of ranges

Fixes #4253.

The schema's validation of ranges now rejects negative numbers, because the C++
code doesn't support them (both before and after this commit):
* utils::parse_range("-7") will return {0,0}, because std::stoi("") throws invalid_argument.
* src/map/location.cpp will parse it as -7, but that will never match an on-map coordinate





More information about the Commits mailing list