From 715eacbf8e4b8cb251edf4e232dd6d322a2f139e Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 5 Sep 2021 20:59:08 -0700 Subject: [PATCH] fusee: accept ini files without empty line at end --- fusee/program/source/fusee_ini.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/fusee/program/source/fusee_ini.cpp b/fusee/program/source/fusee_ini.cpp index 8cf6088ae..687ab4633 100644 --- a/fusee/program/source/fusee_ini.cpp +++ b/fusee/program/source/fusee_ini.cpp @@ -171,11 +171,22 @@ namespace ams::nxboot { } } - if (state == State::TrailingSpace || state == State::Comment || state == State::Newline) { + /* Accept value-state. */ + if (state == State::Value) { + auto *entry = AllocateObject(); + entry->key = key_start; + entry->value = val_start; + + cur_sec->kv_list.push_back(*entry); + + return ParseIniResult_Success; + } else if (state == State::TrailingSpace || state == State::Comment || state == State::Newline) { return ParseIniResult_Success; } else { return ParseIniResult_InvalidFormat; } + + } }