Remove unneccessary checks
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
// Package disasm provides a Z80 disassembler implementation
|
||||
package disasm
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// Instruction represents a decoded Z80 instruction
|
||||
type Instruction struct {
|
||||
Mnemonic string // Human-readable instruction mnemonic
|
||||
@@ -23,10 +19,6 @@ func New() *Disassembler {
|
||||
// Decode decodes a single Z80 instruction from a byte slice
|
||||
// It returns the decoded instruction and any error encountered
|
||||
func (d *Disassembler) Decode(data []byte) (*Instruction, error) {
|
||||
if len(data) == 0 {
|
||||
return nil, fmt.Errorf("no data to decode")
|
||||
}
|
||||
|
||||
// Get the first opcode byte
|
||||
opcode := data[0]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user