mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-03 11:13:54 +00:00
fix some dumb mods
This commit is contained in:
@@ -120,7 +120,7 @@ std::array<u8, 32> IPSwitchCompiler::GetBuildID() const {
|
|||||||
|
|
||||||
static IPSwitchRecord EscapeStringSequences(std::string_view sv) {
|
static IPSwitchRecord EscapeStringSequences(std::string_view sv) {
|
||||||
IPSwitchRecord r{};
|
IPSwitchRecord r{};
|
||||||
for (auto it = sv.cbegin(); it != sv.cend(); ) {
|
for (auto it = sv.cbegin(); it < sv.cend(); ) {
|
||||||
if (*it == '\\' && it + 1 < sv.cend()) {
|
if (*it == '\\' && it + 1 < sv.cend()) {
|
||||||
switch (it[1]) {
|
switch (it[1]) {
|
||||||
case 'a': r.data[r.count] = '\a'; break;
|
case 'a': r.data[r.count] = '\a'; break;
|
||||||
@@ -198,6 +198,8 @@ void IPSwitchCompiler::Parse(std::span<u8 const> bytes) {
|
|||||||
LOG_WARNING(Loader, "Unknown flag {}", line);
|
LOG_WARNING(Loader, "Unknown flag {}", line);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else if (patches.empty()) {
|
||||||
|
LOG_WARNING(Loader, "Invalid line not in a patch {}", line);
|
||||||
} else {
|
} else {
|
||||||
size_t offset = size_t(std::strtoul(line.data(), nullptr, 16));
|
size_t offset = size_t(std::strtoul(line.data(), nullptr, 16));
|
||||||
offset += size_t(offset_shift);
|
offset += size_t(offset_shift);
|
||||||
|
|||||||
Reference in New Issue
Block a user