mirror of
https://github.com/troglobit/finit.git
synced 2026-11-06 15:51:03 +00:00
Length of the ANSI escaped runlevels string is 20 chars, need 21
Problem reported by @wkz Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
a6290da210
commit
51c5f3cbfa
1 file changed
+1
-1
+1
-1
@@ -431,7 +431,7 @@ static int show_version(char *arg)
|
|||||||
char *runlevel_string(int runlevel, int levels)
|
char *runlevel_string(int runlevel, int levels)
|
||||||
{
|
{
|
||||||
int i, pos = 1;
|
int i, pos = 1;
|
||||||
static char lvl[20];
|
static char lvl[21];
|
||||||
|
|
||||||
memset(lvl, 0, sizeof(lvl));
|
memset(lvl, 0, sizeof(lvl));
|
||||||
lvl[0] = '[';
|
lvl[0] = '[';
|
||||||
|
|||||||
Reference in new issue
Block a user