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:
@ -148,7 +148,13 @@ namespace LibCmo::CK2 {
|
||||
}
|
||||
|
||||
// convert encoding
|
||||
m_BindContext->GetUTF8String(cache, *strl);
|
||||
if (!m_BindContext->GetUTF8String(cache, *strl)) {
|
||||
m_BindContext->OutputToConsole(u8"Fail to get UTF8 string when reading CKStateChunk. Some objects may be loaded incorrectly.");
|
||||
strl->clear();
|
||||
return false;
|
||||
}
|
||||
|
||||
// okey
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user