Fix one byte invalid write in shlr/java