Check array lengths before assignment to suppress errors in icedove