summaryrefslogtreecommitdiff
path: root/tools/scaninc/c_file.cpp
diff options
context:
space:
mode:
authorDiegoisawesome <Diegoisawesome@users.noreply.github.com>2018-09-06 12:54:49 -0500
committerGitHub <noreply@github.com>2018-09-06 12:54:49 -0500
commit48ee3ec9592c6ecf278c5bb905360628ce992c57 (patch)
tree180925ab26a3bd87e735bda16454eb977dd6e0b1 /tools/scaninc/c_file.cpp
parentf8f7a8e300eb07935a535996b169682810380a92 (diff)
parente0a83e3d72bb8157a412318734ac026850ca12d3 (diff)
Merge pull request #315 from Diegoisawesome/master
Update scaninc and preproc with multi-file incbins
Diffstat (limited to 'tools/scaninc/c_file.cpp')
-rw-r--r--tools/scaninc/c_file.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/tools/scaninc/c_file.cpp b/tools/scaninc/c_file.cpp
index f7acc833f..d470f959d 100644
--- a/tools/scaninc/c_file.cpp
+++ b/tools/scaninc/c_file.cpp
@@ -244,18 +244,27 @@ void CFile::CheckIncbin()
m_pos++;
- SkipWhitespace();
+ while (true)
+ {
+ SkipWhitespace();
- std::string path = ReadPath();
+ std::string path = ReadPath();
- SkipWhitespace();
+ SkipWhitespace();
+
+ m_incbins.emplace(path);
+
+ if (m_buffer[m_pos] != ',')
+ break;
+
+ m_pos++;
+ }
if (m_buffer[m_pos] != ')')
FATAL_INPUT_ERROR("expected ')'");
m_pos++;
- m_incbins.emplace(path);
}
std::string CFile::ReadPath()