fix: fix issues
- restore some CKGlobals behavior because it will cause runtime exception. - move some classes from CmdHelper to UnvirtContext to make CmdHelper more common to use. - output warning string when fail to get utf8 or ordinary string.
This commit is contained in:
@ -138,7 +138,8 @@ namespace LibCmo::CK2 {
|
||||
|
||||
// convert encoding
|
||||
std::string cache;
|
||||
m_BindContext->GetOrdinaryString(*strl, cache);
|
||||
if (!m_BindContext->GetOrdinaryString(*strl, cache))
|
||||
m_BindContext->OutputToConsole(u8"Fail to get ordinary string when saving CKStateChunk. Some objects may be saved incorrectly.");
|
||||
|
||||
if (cache.empty()) {
|
||||
// write zero string
|
||||
|
Reference in New Issue
Block a user