diff --git a/api/stringPatch.cpp b/api/stringPatch.cpp index 9fea8b5..8c67054 100644 --- a/api/stringPatch.cpp +++ b/api/stringPatch.cpp @@ -373,7 +373,7 @@ namespace gdl { *(int32_t*)(patch + 1) = (int32_t)relAddr; if (auto p = Mod::get()->patch((void*)blocks[0].start, ByteVector(patch, patch + sizeof(patch))); p.isErr()) { - log::error("patch error {}", p.error()); + log::error("patch error {}", p.err()); return false; } @@ -381,14 +381,14 @@ namespace gdl { auto& block = blocks[i]; if (block.len < 5) { if (auto p = Mod::get()->patch((void*)block.start, ByteVector(block.len, 0x90)); p.isErr()) { - log::error("patch error {}", p.error()); + log::error("patch error {}", p.err()); return false; } } else { uint8_t patch2[] = {0xe9, 0x00, 0x00, 0x00, 0x00}; *(int32_t*)(patch2 + 1) = block.len - 5; if (auto p = Mod::get()->patch((void*)block.start, ByteVector(patch2, patch2 + sizeof(patch2))); p.isErr()) { - log::error("patch error {}", p.error()); + log::error("patch error {}", p.err()); return false; } } diff --git a/mod.json b/mod.json index 3a5d113..34f6647 100644 --- a/mod.json +++ b/mod.json @@ -1,14 +1,13 @@ { - "geode": "3.1.1", + "geode": "4.1.2", "version": "v2.0.0", "gd": { - "android": "2.206", - "win": "2.206" + "win": "2.2074" }, "id": "gdlteam.gdl", "name": "GDL", "developer": "GDL Team", - "description": "A mod that translates GD into Russian language", + "description": "Mod that translates GD into Russian language", "early-load": true, "resources": { "files": [ diff --git a/src/patches.cpp b/src/patches.cpp index dbe1e54..208b7f5 100644 --- a/src/patches.cpp +++ b/src/patches.cpp @@ -9,17 +9,18 @@ using namespace geode::prelude; void patches::fixCyrillicP() { // this fixes a bug when comments with cyrillic Р (and other letters containing byte 0xA0) are replaced with something by robtop and break the unicode sequence. // We patch any other unused byte instead of 0xA0. - Result res; #if defined(GEODE_IS_WINDOWS) - res = Mod::get()->patch((void*)(base::get() + 0xB44E6), {0x48, 0xC7, 0xC0, 0x01, 0x00, 0x00, 0x00}); // mov rax, 0x01 + auto res = Mod::get()->patch((void*)(base::get() + 0xB44E6), {0x48, 0xC7, 0xC0, 0x01, 0x00, 0x00, 0x00}); // mov rax, 0x01 #elif defined(GEODE_IS_ANDROID32) - res = Mod::get()->patch((void*)(base::get() + 0x93E795), {0x01}); + auto res = Mod::get()->patch((void*)(base::get() + 0x93E795), {0x01}); #elif defined(GEODE_IS_ANDROID64) - res = Mod::get()->patch((void*)(base::get() + 0xE7F440), {0x01}); + auto res = Mod::get()->patch((void*)(base::get() + 0xE7F440), {0x01}); +#else + #error "Unsupported platform" #endif if (res.isErr()) - log::warn("Failed to patch the Рррр fix ({}), be aware that CommentCell with cyrillic comments may crash!", res.error()); + log::warn("Failed to patch the Рррр fix ({}), be aware that CommentCell with cyrillic comments may crash!", res.err()); } void patches::patchStrings() {