1
0
Fork 0
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:
Jonas 'Sortie' Termansen 2016-01-18 14:33:12 +01:00
parent fbfe159046
commit b2f78fb4e1

View file

@ -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.
@ -1720,7 +1720,10 @@ void HandleCodepoint(uint32_t codepoint, struct Desktop* desktop)
while ( desktop->command[column] )
column++;
if ( c == '\b' )
{
if ( column )
desktop->command[column-1] = '\0';
}
else if ( c == '\n' )
{
if ( !desktop->command[0] && desktop->num_actions != 0 )