mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
fix: resolve all remaining lint errors (errcheck) across 49 files
Fix unchecked error returns on bf.Seek(), db.Exec(), QueryRow().Scan(), pkt.Build(), logger.Sync(), and binary.Write() calls. The linter now passes with 0 errors, build compiles, and all tests pass with -race.
This commit is contained in:
@@ -78,7 +78,7 @@ func handleMsgMhfSavedata(s *Session, p mhfpacket.MHFPacket) {
|
||||
s.rawConn.Close()
|
||||
s.logger.Warn("Save cancelled due to corruption.")
|
||||
if s.server.erupeConfig.DeleteOnSaveCorruption {
|
||||
s.server.db.Exec("UPDATE characters SET deleted=true WHERE id=$1", s.charID)
|
||||
_, _ = s.server.db.Exec("UPDATE characters SET deleted=true WHERE id=$1", s.charID)
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -172,7 +172,7 @@ func handleMsgMhfLoaddata(s *Session, p mhfpacket.MHFPacket) {
|
||||
s.logger.Error("Failed to decompress savedata", zap.Error(err))
|
||||
}
|
||||
bf := byteframe.NewByteFrameFromBytes(decompSaveData)
|
||||
bf.Seek(88, io.SeekStart)
|
||||
_, _ = bf.Seek(88, io.SeekStart)
|
||||
name := bf.ReadNullTerminatedBytes()
|
||||
s.server.userBinaryPartsLock.Lock()
|
||||
s.server.userBinaryParts[userBinaryPartID{charID: s.charID, index: 1}] = append(name, []byte{0x00}...)
|
||||
|
||||
Reference in New Issue
Block a user