Skip to content

Commit

Permalink
1.3.1
Browse files Browse the repository at this point in the history
Prevent flood `stripping string` print  on startup
  • Loading branch information
accelerator74 committed May 7, 2024
1 parent 4afcb95 commit de0316c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ bool Cleaner::SDK_OnLoad(char *error, size_t maxlength, bool late)
rootconsole->ConsolePrint("[CLEANER] Reading strings to clean from 'cleaner.cfg'");
ifstream cleanerConfig(szPath);
string line;
int counter = 1;
while (getline(cleanerConfig, line))
{
// significantly more robust way of stripping evil chars from our string so we don't crash
Expand All @@ -74,13 +75,14 @@ bool Cleaner::SDK_OnLoad(char *error, size_t maxlength, bool late)
// don't strip tiny (including 1 len or less) strings
if (line.length() < 1)
{
rootconsole->ConsolePrint("[CLEANER] Not stripping string on -> L%i with 1 or less length! Length: %i", szStrings.size(), line.length());
rootconsole->ConsolePrint("[CLEANER] Not stripping string on -> L%i with 1 or less length! Length: %i", counter, line.length());
}
else
{
rootconsole->ConsolePrint("[CLEANER] Stripping string on -> L%i: \"%s\" - length: %i", szStrings.size(), line.c_str(), line.length());
szStrings.push_back(line);
}
szStrings.push_back(line);

counter++;
}
rootconsole->ConsolePrint("[CLEANER] %i strings added from cleaner.cfg", szStrings.size());
cleanerConfig.close();
Expand Down
2 changes: 1 addition & 1 deletion smsdk_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
/* Basic information exposed publicly */
#define SMEXT_CONF_NAME "Console Cleaner"
#define SMEXT_CONF_DESCRIPTION "Console warning suppressor"
#define SMEXT_CONF_VERSION "1.3.0"
#define SMEXT_CONF_VERSION "1.3.1"
#define SMEXT_CONF_AUTHOR "Accelerator, Zephyrus"
#define SMEXT_CONF_URL "https://github.com/Accelerator74/Cleaner"
#define SMEXT_CONF_LOGTAG "Cleaner"
Expand Down

0 comments on commit de0316c

Please sign in to comment.