mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Fix trianglix buffer underflow.
This commit is contained in:
parent
fbfe159046
commit
b2f78fb4e1
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
|
|
||||||
Copyright(C) Jonas 'Sortie' Termansen 2013, 2014, 2015.
|
Copyright(C) Jonas 'Sortie' Termansen 2013, 2014, 2015, 2016.
|
||||||
|
|
||||||
This file is part of trianglix.
|
This file is part of trianglix.
|
||||||
|
|
||||||
|
@ -1720,7 +1720,10 @@ void HandleCodepoint(uint32_t codepoint, struct Desktop* desktop)
|
||||||
while ( desktop->command[column] )
|
while ( desktop->command[column] )
|
||||||
column++;
|
column++;
|
||||||
if ( c == '\b' )
|
if ( c == '\b' )
|
||||||
desktop->command[column-1] = '\0';
|
{
|
||||||
|
if ( column )
|
||||||
|
desktop->command[column-1] = '\0';
|
||||||
|
}
|
||||||
else if ( c == '\n' )
|
else if ( c == '\n' )
|
||||||
{
|
{
|
||||||
if ( !desktop->command[0] && desktop->num_actions != 0 )
|
if ( !desktop->command[0] && desktop->num_actions != 0 )
|
||||||
|
|
Loading…
Add table
Reference in a new issue