Fixed bug #1139 again.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_20.3.x@13978 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
Giovanni Di Sirio 2020-12-24 14:59:09 +00:00
parent 3df1f89da6
commit 7ab26d58b5
1 changed files with 7 additions and 6 deletions

View File

@ -85,13 +85,14 @@ objects_factory_t ch_factory;
static void copy_name(const char *sp, char *dp) {
unsigned i;
char c;
i = 0U;
while ((*sp != (char)0) && (i < CH_CFG_FACTORY_MAX_NAMES_LENGTH)) {
*dp = *sp;
sp++;
dp++;
}
i = CH_CFG_FACTORY_MAX_NAMES_LENGTH;
do {
c = *sp++;
*dp++ = c;
i--;
} while ((c != (char)0) && (i > 0U));
}
static inline void dyn_list_init(dyn_list_t *dlp) {