fix SaveDecoMyset on first save

This commit is contained in:
wish
2023-11-29 23:14:34 +11:00
parent c996975bf1
commit 4a962e2701

View File

@@ -281,6 +281,11 @@ func handleMsgMhfSaveDecoMyset(s *Session, p mhfpacket.MHFPacket) {
bf.WriteUint8(0)
}
// Handle nil data
if len(temp) == 0 {
temp = append(bf.Data(), uint8(0))
}
// Build a map of set data
sets := make(map[uint16][]byte)
oldSets := byteframe.NewByteFrameFromBytes(temp[2:])