--- libaitcli/src/cli.c 2019/02/04 21:22:31 1.10 +++ libaitcli/src/cli.c 2022/10/13 21:29:15 1.10.4.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: cli.c,v 1.10 2019/02/04 21:22:31 misho Exp $ +* $Id: cli.c,v 1.10.4.1 2022/10/13 21:29:15 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -12,7 +12,7 @@ terms: All of the documentation and software included in the ELWIX and AITNET Releases is copyrighted by ELWIX - Sofia/Bulgaria -Copyright 2004 - 2019 +Copyright 2004 - 2022 by Michael Pounov . All rights reserved. Redistribution and use in source and binary forms, with or without @@ -138,7 +138,7 @@ int cli_Cmd_Config(void * __restrict cli_buffer, int idx, char ** __restrict args) { linebuffer_t *buf = cli_buffer; - char szPrompt[STRSIZ] = {[0 ... STRSIZ - 1] = 0}; + char szPrompt[STRSIZ + 16] = {[0 ... STRSIZ + 15] = 0}; if (idx == sizeof idx * 8 - 1) return RETCODE_ERR; @@ -162,7 +162,7 @@ int cli_Cmd_End(void * __restrict cli_buffer, int idx, char ** __restrict args) { linebuffer_t *buf = cli_buffer; - char szPrompt[STRSIZ] = {[0 ... STRSIZ - 1] = 0}; + char szPrompt[STRSIZ + 16] = {[0 ... STRSIZ + 15] = 0}; if (!idx) return cli_Cmd_Exit(cli_buffer, idx, args); @@ -186,7 +186,7 @@ int cli_Cmd_Top(void * __restrict cli_buffer, int idx, char ** __restrict args) { linebuffer_t *buf = cli_buffer; - char szPrompt[STRSIZ] = {[0 ... STRSIZ - 1] = 0}; + char szPrompt[STRSIZ + 16] = {[0 ... STRSIZ + 15] = 0}; buf->line_level ^= buf->line_level; snprintf(szPrompt, sizeof szPrompt, "%s{%d}> ", buf->line_porigin, buf->line_level);