don't let nul byte count towards magic string length

Signed-off-by: Anton Lofgren <alofgren@op5.com>