mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-01 02:51:41 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b9fe916bc0 | |||
| 12da7181ff | |||
| 834e578f9b |
@@ -257,6 +257,7 @@ void IPSwitchCompiler::Parse(std::span<u8 const> bytes) {
|
||||
// we dont check for "//", IPS checks for '/' only...
|
||||
if ((!quote && p[0] == '/')
|
||||
|| (!quote && p[0] == '#')) {
|
||||
--p; //eat up the comment char
|
||||
break;
|
||||
} else if (p[0] == '\"' || p[0] == '\'') {
|
||||
quote = (p[0] == quote) ? '\0' : p[0];
|
||||
@@ -267,8 +268,11 @@ void IPSwitchCompiler::Parse(std::span<u8 const> bytes) {
|
||||
++p;
|
||||
}
|
||||
}
|
||||
// remove trailing
|
||||
for (; p > sline.cbegin() && std::isspace(*p); --p)
|
||||
;
|
||||
// now we have the preprocessed string ;)
|
||||
std::string_view pp_str(sline_start, p);
|
||||
std::string_view pp_str(sline_start, (size_t)(p - sline_start));
|
||||
if (pp_str.size() > 0 && !parse_line(pp_str)) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user