mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 16:31:56 +03:00
Use dc indexes accordingly
This commit is contained in:
@@ -3,6 +3,8 @@ package obfuscated2
|
||||
import "encoding/binary"
|
||||
|
||||
const (
|
||||
DefaultDC = 2
|
||||
|
||||
handshakeFrameLen = 64
|
||||
|
||||
handshakeFrameLenKey = 32
|
||||
@@ -41,11 +43,11 @@ func (h *handshakeFrame) dc() int {
|
||||
|
||||
switch {
|
||||
case idx > 0:
|
||||
return int(idx) - 1
|
||||
return int(idx)
|
||||
case idx < 0:
|
||||
return -int(idx + 1)
|
||||
return -int(idx)
|
||||
default:
|
||||
return 0
|
||||
return DefaultDC
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user