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:
parent
3df1f89da6
commit
7ab26d58b5
|
@ -85,13 +85,14 @@ objects_factory_t ch_factory;
|
||||||
|
|
||||||
static void copy_name(const char *sp, char *dp) {
|
static void copy_name(const char *sp, char *dp) {
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
char c;
|
||||||
|
|
||||||
i = 0U;
|
i = CH_CFG_FACTORY_MAX_NAMES_LENGTH;
|
||||||
while ((*sp != (char)0) && (i < CH_CFG_FACTORY_MAX_NAMES_LENGTH)) {
|
do {
|
||||||
*dp = *sp;
|
c = *sp++;
|
||||||
sp++;
|
*dp++ = c;
|
||||||
dp++;
|
i--;
|
||||||
}
|
} while ((c != (char)0) && (i > 0U));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void dyn_list_init(dyn_list_t *dlp) {
|
static inline void dyn_list_init(dyn_list_t *dlp) {
|
||||||
|
|
Loading…
Reference in New Issue