mirror of https://github.com/axmolengine/axmol.git
Update CCUserDefault.cpp
write with variable size, calculate size use int32_t
This commit is contained in:
parent
e4985af560
commit
fce153cdb1
|
@ -85,7 +85,7 @@ static void ud_setkey(std::string& lhs, const cxx17::string_view& rhs) {
|
|||
static void ud_write_v_s(yasio::obstream& obs, const cxx17::string_view value)
|
||||
{
|
||||
size_t valpos = obs.length();
|
||||
obs.write_v(value);
|
||||
obs.write_v32(value);
|
||||
if(!value.empty())
|
||||
UserDefault::getInstance()->encrypt(obs.wptr(valpos + sizeof(int32_t)), obs.length() - valpos - sizeof(int32_t), AES_ENCRYPT);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue