mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-12 23:14:36 +01:00
fix null LoadScenarioData response
This commit is contained in:
@@ -302,7 +302,7 @@ func handleMsgMhfLoadScenarioData(s *Session, p mhfpacket.MHFPacket) {
|
||||
var scenarioData []byte
|
||||
bf := byteframe.NewByteFrame()
|
||||
err := s.server.db.QueryRow("SELECT scenariodata FROM characters WHERE id = $1", s.charID).Scan(&scenarioData)
|
||||
if err != nil {
|
||||
if err != nil || len(scenarioData) < 10 {
|
||||
s.logger.Error("Failed to load scenariodata", zap.Error(err))
|
||||
bf.WriteBytes(make([]byte, 10))
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user