mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
Reader now correctly reads the last line of input (if no newline at eof)
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@365 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -116,11 +116,6 @@ void Reader::readLine(bool in_string) {
|
|||||||
key.clear();
|
key.clear();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (input->Eof()) {
|
|
||||||
// end of file
|
|
||||||
indent = -1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
key = line.substr(indent, pos - indent);
|
key = line.substr(indent, pos - indent);
|
||||||
if (!ignore_invalid && !in_string && starts_with(key, _(" "))) {
|
if (!ignore_invalid && !in_string && starts_with(key, _(" "))) {
|
||||||
warning(_("key: '") + key + _("' starts with a space; only use TABs for indentation!"));
|
warning(_("key: '") + key + _("' starts with a space; only use TABs for indentation!"));
|
||||||
|
|||||||
Reference in New Issue
Block a user