fix implicit ptext length conversion
This commit is contained in:
@@ -1241,7 +1241,7 @@ static HandlerResult S_65_67_68(shared_ptr<ServerState>,
|
|||||||
}
|
}
|
||||||
auto& p = session.lobby_players[index];
|
auto& p = session.lobby_players[index];
|
||||||
p.guild_card_number = cmd.entries[x].lobby_data.guild_card;
|
p.guild_card_number = cmd.entries[x].lobby_data.guild_card;
|
||||||
ptext<char, 0x10> name = cmd.entries[x].disp.name;
|
string name = encode_sjis(cmd.entries[x].disp.name);
|
||||||
p.name = name;
|
p.name = name;
|
||||||
p.section_id = cmd.entries[x].disp.section_id;
|
p.section_id = cmd.entries[x].disp.section_id;
|
||||||
p.char_class = cmd.entries[x].disp.char_class;
|
p.char_class = cmd.entries[x].disp.char_class;
|
||||||
|
|||||||
@@ -39,6 +39,11 @@ inline std::u16string decode_sjis(const std::string& s) {
|
|||||||
return decode_sjis(s.data(), s.size());
|
return decode_sjis(s.data(), s.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// These functions exist so that decode_sjis and encode_sjis can be
|
||||||
|
// indiscriminately used within templates that use different char types.
|
||||||
|
inline const std::string& encode_sjis(const std::string& s) { return s; }
|
||||||
|
inline const std::u16string& decode_sjis(const std::u16string& s) { return s; }
|
||||||
|
|
||||||
// (1b) Type-independent utility functions
|
// (1b) Type-independent utility functions
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
Reference in New Issue
Block a user