fix: aarch64 builds (#10)

This commit is contained in:
cobalt2727 2023-11-19 19:08:56 -06:00 committed by GitHub
commit 18c25b2385
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,10 +113,10 @@ void appendHalfToBuffer(std::vector<u8>* buf, u16 word)
std::string ConvertConnectCodeForGame(const std::string& input)
{
// Shift-Jis '#' symbol is two bytes (0x8194), followed by 0x00 null terminator
char full_width_shift_jis_hashtag[] = {-127, -108, 0}; // 0x81, 0x94, 0x00
signed char full_width_shift_jis_hashtag[] = {-127, -108, 0}; // 0x81, 0x94, 0x00
std::string connect_code(input);
// SLIPPITODONot the best use of ReplaceAll. potential bug if more than one '#' found.
connect_code = ReplaceAll(connect_code, "#", std::string(full_width_shift_jis_hashtag));
connect_code = ReplaceAll(connect_code, "#", std::string(reinterpret_cast<const char*>(full_width_shift_jis_hashtag)));
// fixed length + full width (two byte) hashtag +1, null terminator +1
connect_code.resize(CONNECT_CODE_LENGTH + 2);
return connect_code;