Fix use after free (realloc) in ParseText.cpp

Static analysis detected a use after free (realloc).  The
member variable should use the new string address, and it
is assigned the new string address after the usage.  This
looks to be a copy/paste error sometime in the past.  In
addition, follow the stated convention and null terminate
the string, just in case.