diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-08-15 00:28:36 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-08-15 00:30:19 -0400 |
commit | 80ac577deba20bc452d7cc3992bc068c49257e62 (patch) | |
tree | 4ac31cb7d05430e04201e794413ce448f713da74 | |
parent | 717a8ea169d759c361f97cab0bfe0daeb6762691 (diff) | |
download | crawl-ref-80ac577deba20bc452d7cc3992bc068c49257e62.tar.gz crawl-ref-80ac577deba20bc452d7cc3992bc068c49257e62.zip |
basic check to make sure it even looks like a dump file
-rw-r--r-- | crawl-ref/source/wiz-dump.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/wiz-dump.cc b/crawl-ref/source/wiz-dump.cc index fa27bc8468..e894746817 100644 --- a/crawl-ref/source/wiz-dump.cc +++ b/crawl-ref/source/wiz-dump.cc @@ -359,6 +359,10 @@ bool chardump_parser::_parse_from_file(const string &full_filename) if (f.eof()) return false; + string first_line = f.get_line(); + if (first_line.substr(0, 34) != " Dungeon Crawl Stone Soup version ") + return false; + while (!f.eof()) _modify_character(f.get_line()); |