mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-08-14 05:05:54 +08:00
Update storestrings.cpp
minor refactoring thanks @treeplek
This commit is contained in:
parent
481e6ab6bc
commit
0c306a2aff
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user