mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +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
|
var scenarioData []byte
|
||||||
bf := byteframe.NewByteFrame()
|
bf := byteframe.NewByteFrame()
|
||||||
err := s.server.db.QueryRow("SELECT scenariodata FROM characters WHERE id = $1", s.charID).Scan(&scenarioData)
|
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))
|
s.logger.Error("Failed to load scenariodata", zap.Error(err))
|
||||||
bf.WriteBytes(make([]byte, 10))
|
bf.WriteBytes(make([]byte, 10))
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user