SQUASH/write_reg_contents_ex 5: fix maxlen calc 2