[cfe-commits] Patch for Bug 9875 (getVisualStudioDir() brakes	system environment)
    Nikola Smiljanic 
    popizdeh at gmail.com
       
    Sat Jul 16 05:44:18 PDT 2011
    
    
  
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110716/4a38fa64/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9875.patch
Type: application/octet-stream
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110716/4a38fa64/attachment.obj>
    
    
More information about the cfe-commits
mailing list