Skip to content

Commit

Permalink
- fixed parsing issues in secret hint system.
Browse files Browse the repository at this point in the history
  • Loading branch information
coelckers committed May 24, 2022
1 parent aab13ad commit 5aabde1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/core/secrets.cpp
Expand Up @@ -90,7 +90,9 @@ CCMD(secret)
if (!foundsome)
{
FString levelname;
if (thislevel) levelname.Format("%s - %s", mapname, currentLevel->name.GetChars());
auto cc = currentLevel->name.GetChars();
if (*cc == '$') cc = GStrings[cc + 1];
if (thislevel) levelname.Format("%s - %s", mapname, cc);
else levelname = mapname;
Printf(TEXTCOLOR_YELLOW "%s\n", levelname.GetChars());
size_t llen = levelname.Len();
Expand All @@ -107,7 +109,7 @@ CCMD(secret)
if (readbuffer[0] != '[')
{
linebuild += readbuffer;
if (linebuild.Len() < 1023 || linebuild[1022] == '\n')
if (linebuild.Len() < 10239 || linebuild[10238] == '\n')
{
// line complete so print it.
linebuild.Substitute("\r", "");
Expand Down

0 comments on commit 5aabde1

Please sign in to comment.