[Commits] [wesnoth/wesnoth] 8984ce: preproc: Fix garbage at the end of #warning/#error...

GitHub noreply at github.com
Sun Apr 5 05:44:44 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 8984cefe1d74ab09e86f71982a1a8424c212074a
      https://github.com/wesnoth/wesnoth/commit/8984cefe1d74ab09e86f71982a1a8424c212074a
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2015-04-05 (Sun, 05 Apr 2015)

  Changed paths:
    M src/serialization/preprocessor.cpp

  Log Message:
  -----------
  preproc: Fix garbage at the end of #warning/#error lines at EOF

Using #warning or #error at the very end of a file would generate a
trailing garbage character in diagnostics, apparently caused by
read_rest_of_line() checking for EOF before the stream can actually know
it's at EOF.

I'm not good at streams, but this fixes the bug for me with no
regressions, and the function in question is only used by the
code handling #warning/#error anyway.


  Commit: 7c7c94bad94e056224439ce319f2f8ab75b8f7c1
      https://github.com/wesnoth/wesnoth/commit/7c7c94bad94e056224439ce319f2f8ab75b8f7c1
  Author: Ignacio R. Morelle <shadowm at wesnoth.org>
  Date:   2015-04-05 (Sun, 05 Apr 2015)

  Changed paths:
    M src/tests/test_filesystem.cpp

  Log Message:
  -----------
  Additional filesystem::get_wml_location() test cases


Compare: https://github.com/wesnoth/wesnoth/compare/464c638b129a...7c7c94bad94e


More information about the Commits mailing list