0023280: Pointer to local array is stored outside the scope of this array.
authorPawel <pawel-kowalski@wp.pl>
Fri, 13 Jul 2012 14:29:20 +0000 (16:29 +0200)
committerPawel Kowalski <pawel-kowalski@wp.pl>
Mon, 23 Jul 2012 11:00:03 +0000 (15:00 +0400)
Moved the array 'buff' so it can be visible while 'str' still refers to it.

src/OSD/OSD_Real2String.cxx

index dc70abf..5b81c07 100755 (executable)
@@ -100,10 +100,10 @@ Standard_Boolean OSD_Real2String::CStringToReal(const Standard_CString theString
 
 
   const char *str = theString;
+  char buff[1024];
   if (myReadDecimalPoint) {
       if (myReadDecimalPoint != myLocalDecimalPoint) {
-         const char * p;
-          char buff[1024]; 
+         const char * p; 
          // replace the decimal point by the local one
           if(myReadDecimalPoint != myLocalDecimalPoint && 
              (p = strchr(theString,myReadDecimalPoint))&& ((p-theString) < 1000) )