Browse Source

Bugfix: Initialize logwin to 1 line high temporarily, to avert PDCurses crash

Luke Dashjr 13 years ago
parent
commit
23efa8476a
1 changed files with 3 additions and 1 deletions
  1. 3 1
      cgminer.c

+ 3 - 1
cgminer.c

@@ -4002,7 +4002,9 @@ void enable_curses(void) {
 	getmaxyx(mainwin, y, x);
 	statuswin = newwin(logstart, x, 0, 0);
 	leaveok(statuswin, true);
-	logwin = newwin(y - logcursor, 0, logcursor, 0);
+	// For whatever reason, PDCurses crashes if the logwin is initialized to height y-logcursor
+	// We resize the window later anyway, so just start it off at 1 :)
+	logwin = newwin(1, 0, logcursor, 0);
 	idlok(logwin, true);
 	scrollok(logwin, true);
 	leaveok(logwin, true);