terminate session on save corruption

This commit is contained in:
wish
2022-12-23 23:12:01 +11:00
parent 00d3c05e6e
commit 7676f2e7d5
2 changed files with 11 additions and 5 deletions

View File

@@ -2,6 +2,8 @@ package channelserver
import (
"encoding/binary"
"erupe-ce/common/bfutil"
"erupe-ce/common/stringsupport"
"erupe-ce/network/mhfpacket"
"erupe-ce/server/channelserver/compression/nullcomp"
@@ -135,6 +137,7 @@ func (save *CharacterSaveData) updateSaveDataWithStruct() {
// This will update the save struct with the values stored in the character save
func (save *CharacterSaveData) updateStructWithSaveData() {
save.Name = stringsupport.SJISToUTF8(bfutil.UpToNull(save.decompSave[88:100]))
if save.decompSave[pointerGender] == 1 {
save.Gender = true
} else {