Skip to content

Commit

Permalink
Update storestrings.cpp
Browse files Browse the repository at this point in the history
minor refactoring thanks @treeplek
  • Loading branch information
Luc committed Jan 25, 2016
1 parent 481e6ab commit 0c306a2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions esp8266/storestrings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,7 @@ bool STORESTRINGS_CLASS::add (const char * string){
if (need_resize)
{ //copy maximum length minus 3
strncpy(ptr,string,_maxstringlength-3);
//add nul char
ptr[_maxstringlength-3]='\0';
//add dot to show string was cutted
strcat(ptr,"...");
strcpy(ptr+_maxstringlength-3,"...");
}
else
{ //copy as it is
Expand Down

0 comments on commit 0c306a2

Please sign in to comment.