Fixed (probably harmless) one-byte out-of-bounds read

After the for loop has finished, *size (which would be set to the address
of the terminating NULL plus one) is evaluated before !done is checked,
causing a one-byte out-of-bounds read. The value is not actually used for
anything, it's OK if it returns false, and never written to, but might
as well do things right.