summaryrefslogtreecommitdiff
path: root/tools/scaninc/c_file.cpp
diff options
context:
space:
mode:
authorDizzyEggg <jajkodizzy@wp.pl>2018-09-09 20:31:56 +0200
committerDizzyEggg <jajkodizzy@wp.pl>2018-09-09 20:31:56 +0200
commitcf8898071d0aa02438be2b1b1d03a6e6b33892be (patch)
tree645e643948653d0ae99a9187aab5e769c1ac3737 /tools/scaninc/c_file.cpp
parent4d1df7ecbe69cf151d00976648aa34faae8cd6e9 (diff)
parente21b91cc2f48c4b6bf2cb2d8e97ea1d55c0163bb (diff)
Merge branch 'decompile_frontier_2' of https://github.com/DizzyEggg/pokeemerald into decompile_frontier_2
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()