fix crash when no newline at the end of config file.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@550 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
smorlat 2009-07-24 13:47:08 +00:00
parent 552f55f00a
commit 968171e48f

View file

@ -185,7 +185,7 @@ void lp_config_parse(LpConfig *lpconfig){
pos1++;
pos2=strchr(pos1,'\n');
if (pos2==NULL) pos2=pos1+strlen(pos2);
if (pos2==NULL) pos2=pos1+strlen(pos1);
else {
*pos2='\0'; /*replace the '\n' */
pos2--;