summaryrefslogtreecommitdiff
path: root/tools/scaninc/c_file.cpp
diff options
context:
space:
mode:
authorTetrable <atiftetra@gmail.com>2018-09-09 20:42:23 +0100
committerGitHub <noreply@github.com>2018-09-09 20:42:23 +0100
commit3a0c26887efb6abc8106671ceefcc098737d823b (patch)
tree930dcf2dc217011c45671f3bf2017ec9111fd6ed /tools/scaninc/c_file.cpp
parent5a53d6d1fb304736c1fb3c222192a3b722707bca (diff)
parente1834c9d7bc961f872169e056b788fec04f39867 (diff)
Merge pull request #3 from pret/master
merge
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()