Ensure va_end() is always called in TextWindow::Printf().

This commit is contained in:
Mat M 2018-07-12 01:06:35 -04:00 committed by whitequark
parent 771b415a12
commit 03e479eb25

View File

@ -294,11 +294,11 @@ void TextWindow::ClearScreen() {
void TextWindow::Printf(bool halfLine, const char *fmt, ...) {
if(!canvas) return;
if(rows >= MAX_ROWS) return;
va_list vl;
va_start(vl, fmt);
if(rows >= MAX_ROWS) return;
int r, c;
r = rows;
top[r] = (r == 0) ? 0 : (top[r-1] + (halfLine ? 3 : 2));