I had that problem with wall textures when I was rounding (to the nearest value) the pixel position on the wall to the y-position on the screen, instead of 'flooring' the value.