summaryrefslogtreecommitdiff
path: root/tools/scaninc
diff options
context:
space:
mode:
authorSlawter666 <38655737+Slawter666@users.noreply.github.com>2018-09-07 11:50:23 +0100
committerSlawter666 <38655737+Slawter666@users.noreply.github.com>2018-09-07 11:50:23 +0100
commit9dec2bdef891653d10060a45417609c4d31b14c7 (patch)
treef9080cfc922a15570aeeee98d1ff695596e55ccb /tools/scaninc
parentbc42c5054c335f4de8a6b43135673ce931991c3e (diff)
parentef62393289b7a1d2e20fe195e24830d5c1f2f973 (diff)
Merge branch 'master' of https://github.com/pret/pokeemerald into spritesheet
Diffstat (limited to 'tools/scaninc')
-rw-r--r--tools/scaninc/Makefile2
-rw-r--r--tools/scaninc/c_file.cpp17
2 files changed, 14 insertions, 5 deletions
diff --git a/tools/scaninc/Makefile b/tools/scaninc/Makefile
index 3e1c031a8..367a3350b 100644
--- a/tools/scaninc/Makefile
+++ b/tools/scaninc/Makefile
@@ -1,6 +1,6 @@
CXX = g++
-CXXFLAGS = -Wall -Werror -std=c++11 -O2 -s
+CXXFLAGS = -Wall -Werror -std=c++11 -O2
SRCS = scaninc.cpp c_file.cpp asm_file.cpp
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()