Skip to content

Commit 9943bf3

Browse files
committed
FIX: correct html indentation for L()
1 parent a542643 commit 9943bf3

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<ProjectOutputs>
4+
<ProjectOutput>
5+
<FullPath>D:\__PR00F__\___developing___\projects\PGE-misc\src\DebugPR00FPS\CConsole.exe</FullPath>
6+
</ProjectOutput>
7+
</ProjectOutputs>
8+
<ContentFiles />
9+
<SatelliteDlls />
10+
<NonRecipeFileRefs />
11+
</Project>

CConsole/src/CConsole.cpp

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ class CConsole::CConsoleImpl
114114
WORD clr, const char* html = NULL); /**< Sets bools color. */
115115

116116
void O(const char* text, va_list list); /**< Prints text to console. */
117+
void O(const char* text, ...); /**< Prints text to console. */
117118
void OLn(const char* text, va_list list); /**< Prints text to console and adds a new line. */
118119
void OLn(const char* text, ...); /**< Prints text to console and adds a new line. */
119120
void OI(); /**< Indent(). */
@@ -814,6 +815,21 @@ void CConsole::CConsoleImpl::O(const char* text, va_list list)
814815
} // O()
815816

816817

818+
/**
819+
Prints text to console.
820+
*/
821+
void CConsole::CConsoleImpl::O(const char* text, ...)
822+
{
823+
if (!bInited)
824+
return;
825+
826+
va_list list;
827+
va_start(list, text);
828+
O(text, list);
829+
va_end(list);
830+
} // O()
831+
832+
817833
/**
818834
Prints text to console and adds a new line.
819835
*/
@@ -990,9 +1006,12 @@ void CConsole::CConsoleImpl::L(int n)
9901006
if ( !bInited )
9911007
return;
9921008

1009+
// we need to invoke O() instead of WriteText(), because latter won't take care of the indentation properly for html
9931010
for (int i = 0; i < n; i++)
994-
WriteText("-=");
995-
WriteText("\n\r");
1011+
{
1012+
O("-=");
1013+
}
1014+
OLn("\n\r");
9961015
} // L()
9971016

9981017

0 commit comments

Comments
 (0)