From 23323c97ef85017237b9a100aa124ab204d24899 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Mon, 12 Nov 2012 18:39:58 +0000 Subject: [PATCH] some tiny sanity checks Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3801 --- src/debug/debug_gui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/debug/debug_gui.cpp b/src/debug/debug_gui.cpp index 60166d91..44adfd4a 100644 --- a/src/debug/debug_gui.cpp +++ b/src/debug/debug_gui.cpp @@ -86,6 +86,7 @@ void DEBUG_RefreshPage(char scroll) { list::iterator i = logBuffPos; int maxy, maxx; getmaxyx(dbg.win_out,maxy,maxx); int rem_lines = maxy; + if(rem_lines == -1) return; wclear(dbg.win_out); @@ -109,7 +110,7 @@ void LOG::operator() (char const* format, ...){ if (d_type>=LOG_MAX) return; if ((d_severity!=LOG_ERROR) && (!loggrp[d_type].enabled)) return; - DEBUG_ShowMsg("%10u: %s:%s\n",cycle_count,loggrp[d_type].front,buf); + DEBUG_ShowMsg("%10u: %s:%s\n",static_cast(cycle_count),loggrp[d_type].front,buf); } @@ -179,6 +180,7 @@ static void MakeSubWindows(void) { outy+=5; // 34 /* The Output Window */ dbg.win_out=subwin(dbg.win_main,win_main_maxy-outy,win_main_maxx,outy,0); + if(!dbg.win_reg ||!dbg.win_data || !dbg.win_code || !dbg.win_var || !dbg.win_out) E_Exit("Setting up windows failed"); // dbg.input_y=win_main_maxy-1; scrollok(dbg.win_out,TRUE); DrawBars();