diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/showmsg.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common/showmsg.c b/src/common/showmsg.c index dd8cfb07a..58c26ac8a 100644 --- a/src/common/showmsg.c +++ b/src/common/showmsg.c @@ -350,6 +350,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) // \033[2J - Clears the screen and moves the cursor to the home position (line 1, column 1). uint8 num = (numbers[numpoint]>>4)*10+(numbers[numpoint]&0x0F); int cnt; + uint32 tmp; COORD origin = {0,0}; if(num==1) { // chars from start up to and including cursor @@ -365,8 +366,8 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) origin = info.dwCursorPosition; cnt = info.dwSize.X * (info.dwSize.Y - info.dwCursorPosition.Y) - info.dwCursorPosition.X; } - FillConsoleOutputAttribute(handle,info.wAttributes,cnt,origin,NULL); - FillConsoleOutputCharacter(handle,' ', cnt,origin,NULL); + FillConsoleOutputAttribute(handle, info.wAttributes, cnt, origin, &tmp); + FillConsoleOutputCharacter(handle, ' ', cnt, origin, &tmp); } else if( *q=='K' ) { // \033[K : clear line from actual position to end of the line @@ -377,6 +378,7 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) uint8 num = (numbers[numpoint]>>4)*10+(numbers[numpoint]&0x0F); COORD origin = {0,info.dwCursorPosition.Y}; SHORT cnt; + uint32 tmp; if(num==1) { cnt = info.dwCursorPosition.X + 1; @@ -390,8 +392,8 @@ int VFPRINTF(HANDLE handle, const char *fmt, va_list argptr) origin = info.dwCursorPosition; cnt = info.dwSize.X - info.dwCursorPosition.X; // how many spaces until line is full } - FillConsoleOutputAttribute(handle, info.wAttributes, cnt, origin, NULL); - FillConsoleOutputCharacter(handle, ' ', cnt, origin, NULL); + FillConsoleOutputAttribute(handle, info.wAttributes, cnt, origin, &tmp); + FillConsoleOutputCharacter(handle, ' ', cnt, origin, &tmp); } else if( *q == 'H' || *q == 'f' ) { // \033[#;#H - Cursor Position (CUP) |