Fixes counter overflow in lander reports; (MORE) is always printed when necessary. Bug #448
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1141 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -102,11 +102,22 @@ MakeReport (SOUND ReadOutSounds, UNICODE *pStr, COUNT StrLen)
|
|||||||
{
|
{
|
||||||
COUNT col_cells;
|
COUNT col_cells;
|
||||||
UNICODE *pLastStr;
|
UNICODE *pLastStr;
|
||||||
|
UNICODE *pTempStr;
|
||||||
|
COUNT lf_pos;
|
||||||
|
|
||||||
pLastStr = t.pStr;
|
pLastStr = t.pStr;
|
||||||
|
|
||||||
|
// scan for LFs in the remaining string
|
||||||
|
// trailing LF will be ignored
|
||||||
|
for (lf_pos = StrLen, pTempStr = t.pStr;
|
||||||
|
lf_pos && *pTempStr != '\n';
|
||||||
|
--lf_pos, ++pTempStr)
|
||||||
|
;
|
||||||
|
|
||||||
col_cells = 0;
|
col_cells = 0;
|
||||||
if (row_cells == NUM_CELL_ROWS - 1 && StrLen > NUM_CELL_COLS)
|
// check if the remaining text fits on current screen
|
||||||
|
if (row_cells == NUM_CELL_ROWS - 1
|
||||||
|
&& (StrLen > NUM_CELL_COLS || lf_pos > 1))
|
||||||
{
|
{
|
||||||
col_cells = (NUM_CELL_COLS >> 1) - (end_page_len >> 1);
|
col_cells = (NUM_CELL_COLS >> 1) - (end_page_len >> 1);
|
||||||
t.pStr = end_page_buf;
|
t.pStr = end_page_buf;
|
||||||
|
|||||||
Reference in New Issue
Block a user