From: Pawel Date: Fri, 13 Jul 2012 14:29:20 +0000 (+0200) Subject: 0023280: Pointer to local array is stored outside the scope of this array. X-Git-Tag: V6_5_4_beta1~111 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=abd9003d5f421d7cd2ec1bb86e85305643d76404;p=occt-copy.git 0023280: Pointer to local array is stored outside the scope of this array. Moved the array 'buff' so it can be visible while 'str' still refers to it. --- diff --git a/src/OSD/OSD_Real2String.cxx b/src/OSD/OSD_Real2String.cxx index dc70abf747..5b81c07746 100755 --- a/src/OSD/OSD_Real2String.cxx +++ b/src/OSD/OSD_Real2String.cxx @@ -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) )