X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fdrv%2Fvterm_termbuf.c;h=e03302a1bf62aa6462007ca22cd3541a6b90912d;hb=1c388a6c77f8f04b269051d0e089eaab9e45b391;hp=525f1a4b3d0034ede417839c2ed189eb7dc83dec;hpb=b0da731b2d89b9dd58de2c98eaf6218a41a21920;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/drv/vterm_termbuf.c b/KernelLand/Kernel/drv/vterm_termbuf.c index 525f1a4b..e03302a1 100644 --- a/KernelLand/Kernel/drv/vterm_termbuf.c +++ b/KernelLand/Kernel/drv/vterm_termbuf.c @@ -21,14 +21,11 @@ void VT_int_PutString(tVTerm *Term, const Uint8 *Buffer, Uint Count) for( i = 0; i < Count; i++ ) { // Handle escape sequences - if( Buffer[i] == 0x1B && Count - i > 1 ) + int ret = VT_int_ParseEscape(Term, (const char*)&Buffer[i], Count-i); + if( ret > 0 ) { - int ret = VT_int_ParseEscape(Term, (const char*)&Buffer[i+1], Count-(i+1)); - if( ret > 0 ) - { - i += ret; - continue; - } + i += ret-1; + continue; } // Fast check for non UTF-8