diff options
| author | Eli Zaretskii | 2013-06-03 22:28:13 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-06-03 22:28:13 +0300 |
| commit | 9337e20653c80e332555d109b945180cf41171fa (patch) | |
| tree | c8aa352b0b5eeb3d9e23ebd571ed1bfefcafb925 /src/term.c | |
| parent | 7f203aa1fde2bc9ec43aa05a939525cdab149832 (diff) | |
| download | emacs-9337e20653c80e332555d109b945180cf41171fa.tar.gz emacs-9337e20653c80e332555d109b945180cf41171fa.zip | |
Fix crashes in a text-mode session on Windows.
src/w32console.c (initialize_w32_display): Return the dimensions of
the console window via 2 additional arguments, not via the current
frame. This avoids crashes due to overrunning the bounds of
frame's decode_mode_spec_buffer, which is not resized following
the change of the frame dimensions from the initial 10x10.
src/w32term.h (w32_initialize_display_info): Adjust prototype.
src/term.c (init_tty): Take dimensions of the frame from the values
returned by initialize_w32_display.
Diffstat (limited to 'src/term.c')
| -rw-r--r-- | src/term.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/term.c b/src/term.c index 28b944c6436..0bcef55947a 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -3189,12 +3189,13 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\ | |||
| 3189 | #ifdef WINDOWSNT | 3189 | #ifdef WINDOWSNT |
| 3190 | { | 3190 | { |
| 3191 | struct frame *f = XFRAME (selected_frame); | 3191 | struct frame *f = XFRAME (selected_frame); |
| 3192 | int height, width; | ||
| 3192 | 3193 | ||
| 3193 | initialize_w32_display (terminal); | 3194 | initialize_w32_display (terminal, &width, &height); |
| 3194 | 3195 | ||
| 3195 | FrameRows (tty) = FRAME_LINES (f); | 3196 | FrameRows (tty) = height; |
| 3196 | FrameCols (tty) = FRAME_COLS (f); | 3197 | FrameCols (tty) = width; |
| 3197 | tty->specified_window = FRAME_LINES (f); | 3198 | tty->specified_window = height; |
| 3198 | 3199 | ||
| 3199 | FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; | 3200 | FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; |
| 3200 | terminal->char_ins_del_ok = 1; | 3201 | terminal->char_ins_del_ok = 1; |