Finite-size analysis of the hard-square lattice gas