From 3275e9d0f89f2860f5e9dfd3ca2bf20e2d89d91a Mon Sep 17 00:00:00 2001 From: ennewalker Date: Sat, 18 Apr 2009 17:03:18 +0000 Subject: [2735312] Don't squelch multiple EOLs in the same cprintf for tiles. This should remove the inconsistency between tiles and console text printing. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9628 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tilereg.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/tilereg.cc') diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc index e4173944f1..73992978f1 100644 --- a/crawl-ref/source/tilereg.cc +++ b/crawl-ref/source/tilereg.cc @@ -2172,12 +2172,14 @@ void TextRegion::addstr(char *buffer) { char c = buffer[i]; bool newline = false; - if (c == '\n' || c == '\r') + + if (c == '\r') + continue; + + if (c == '\n') { c = 0; newline = true; - if (buffer[i+1] == '\n' || buffer[i+1] == '\r') - i++; } buf2[j] = c; j++; -- cgit v1.2.3-54-g00ecf