library: adapt for increased (cmd) program name length
In the new library 'cmd' is dynamically allocated just
like 'cmdline'. This will align us with the ref below.
Reference(s):
. master branch increase to 64
commit 2cfdbbe897
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@ -268,7 +268,7 @@ ENTER(0x220);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case_Name:
|
case_Name:
|
||||||
{ char buf[16];
|
{ char buf[64];
|
||||||
unsigned u = 0;
|
unsigned u = 0;
|
||||||
while(u < sizeof(buf) - 1u){
|
while(u < sizeof(buf) - 1u){
|
||||||
int c = *S++;
|
int c = *S++;
|
||||||
@ -283,7 +283,7 @@ ENTER(0x220);
|
|||||||
buf[u++] = c;
|
buf[u++] = c;
|
||||||
}
|
}
|
||||||
buf[u] = '\0';
|
buf[u] = '\0';
|
||||||
if (!P->cmd && !(P->cmd = strndup(buf, 15)))
|
if (!P->cmd && !(P->cmd = strdup(buf)))
|
||||||
return 1;
|
return 1;
|
||||||
S--; // put back the '\n' or '\0'
|
S--; // put back the '\n' or '\0'
|
||||||
continue;
|
continue;
|
||||||
|
Reference in New Issue
Block a user