astropy/astropy — pull request #2645 by embray (2014-06-19 19:08:59+00:00)
Title: Fixes spacetelescope/PyFITS#71

This is a fix I merged in from PyFITS (see spacetelescope/PyFITS#71). I've already tested this on the PyFITS end, so if the tests pass here it should be merged in. It's a bug that can lead to writing corrupt data which is always bad.