TUCKER: Add a safeguard in updateCharPosition() to avoid a potential out-of-bounds read, change the type of a variable to boolean