SCP: Cleanup compiler warning about potential buffer truncation

This commit is contained in:
Mark Pizzolato 2020-02-25 00:17:49 -08:00
parent 8b64e5df1a
commit 146f05d1f7

4
scp.c
View file

@ -3607,7 +3607,7 @@ return do_cmd_label (flag, fcptr, NULL);
static char *do_position(void)
{
static char cbuf[CBUFSIZE];
static char cbuf[4*CBUFSIZE];
snprintf (cbuf, sizeof (cbuf), "%s%s%s-%d", sim_do_filename[sim_do_depth], sim_do_label[sim_do_depth] ? "::" : "", sim_do_label[sim_do_depth] ? sim_do_label[sim_do_depth] : "", sim_goto_line[sim_do_depth]);
return cbuf;
@ -5045,7 +5045,7 @@ return SCPE_UNK; /* only valid inside of
t_stat call_cmd (int32 flag, CONST char *fcptr)
{
char cbuf[CBUFSIZE], gbuf[CBUFSIZE];
char cbuf[2*CBUFSIZE], gbuf[CBUFSIZE];
const char *cptr;
if (NULL == sim_gotofile) return SCPE_UNK; /* only valid inside of do_cmd */