[cfe-commits] Patch for Bug 9875 (getVisualStudioDir() brakes system environment)

Francois Pichet pichet2000 at gmail.com
Sat Jul 16 14:18:51 PDT 2011


On Sat, Jul 16, 2011 at 8:44 AM, Nikola Smiljanic <popizdeh at gmail.com> wrote:
> The code in getVisualStudioDir changes the string returned by getenv, and
> this is forbidden. Any subsequent call to getenv returns the modified
> string.
> I've changed the code to initialize path using the string range constructor
> (pointer returned by strstr is used like an end iterator) instead of null
> terminating the string returned by getenv. I've also removed the const_cast.

LGTM, committed in r135356



More information about the cfe-commits mailing list