diff options
author | Ron Yorston <rmy@pobox.com> | 2012-02-07 14:54:02 +0000 |
---|---|---|
committer | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2012-02-07 22:43:03 +0700 |
commit | 7968631c512dc2d22fb63945e9619d705d21108f (patch) | |
tree | 100a35cd4fa9fee7542237c44796edb1ec950369 | |
parent | 35fb26370c88b9d61c6a1f95e0da5872ef882baf (diff) | |
download | busybox-w32-7968631c512dc2d22fb63945e9619d705d21108f.tar.gz busybox-w32-7968631c512dc2d22fb63945e9619d705d21108f.tar.bz2 busybox-w32-7968631c512dc2d22fb63945e9619d705d21108f.zip |
Fix crash in Windows 7 ANSI emulation
-rw-r--r-- | win32/winansi.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/win32/winansi.c b/win32/winansi.c index 52d401220..f08fe2b79 100644 --- a/win32/winansi.c +++ b/win32/winansi.c | |||
@@ -96,6 +96,7 @@ static void erase_till_end_of_screen(void) | |||
96 | { | 96 | { |
97 | CONSOLE_SCREEN_BUFFER_INFO sbi; | 97 | CONSOLE_SCREEN_BUFFER_INFO sbi; |
98 | COORD pos; | 98 | COORD pos; |
99 | DWORD dummy; | ||
99 | 100 | ||
100 | if (!console) | 101 | if (!console) |
101 | return; | 102 | return; |
@@ -103,12 +104,12 @@ static void erase_till_end_of_screen(void) | |||
103 | GetConsoleScreenBufferInfo(console, &sbi); | 104 | GetConsoleScreenBufferInfo(console, &sbi); |
104 | FillConsoleOutputCharacterA(console, ' ', | 105 | FillConsoleOutputCharacterA(console, ' ', |
105 | sbi.dwSize.X - sbi.dwCursorPosition.X, sbi.dwCursorPosition, | 106 | sbi.dwSize.X - sbi.dwCursorPosition.X, sbi.dwCursorPosition, |
106 | NULL); | 107 | &dummy); |
107 | 108 | ||
108 | pos.X = 0; | 109 | pos.X = 0; |
109 | for (pos.Y = sbi.dwCursorPosition.Y+1; pos.Y < sbi.dwSize.Y; pos.Y++) | 110 | for (pos.Y = sbi.dwCursorPosition.Y+1; pos.Y < sbi.dwSize.Y; pos.Y++) |
110 | FillConsoleOutputCharacterA(console, ' ', sbi.dwSize.X, | 111 | FillConsoleOutputCharacterA(console, ' ', sbi.dwSize.X, |
111 | pos, NULL); | 112 | pos, &dummy); |
112 | } | 113 | } |
113 | 114 | ||
114 | static void move_cursor_back(int n) | 115 | static void move_cursor_back(int n) |