summaryrefslogtreecommitdiff
path: root/tools/scaninc/c_file.cpp
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2018-10-13 10:22:58 -0500
committerMarcus Huderle <huderlem@gmail.com>2018-10-13 10:22:58 -0500
commitb24559d69b6fa0abf042a1b7cdbcab3d1ec91fd6 (patch)
tree7b51d7b9cb9a370fe1dd9db8eeadc23089ba1328 /tools/scaninc/c_file.cpp
parentfa9d1759bd7fa17ced37225bd31d46466da857c6 (diff)
parenta2a6700966cc802185577e44ba88a9154429c93b (diff)
Merge remote-tracking branch 'upstream/master' into shop
# Conflicts: # asm/shop.s
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()