diff --git a/direct_io.go b/direct_io.go index 42ad06c..cc0464c 100644 --- a/direct_io.go +++ b/direct_io.go @@ -31,6 +31,9 @@ func alignment(block []byte, AlignSize int) int { // IsAligned checks wether passed byte slice is aligned func IsAligned(block []byte) bool { + if AlignSize == 0 { + return true + } return alignment(block, AlignSize) == 0 }