Mr.Grom
24.11.2009, 08:31
Фикс краша сервера при отсутствии файлов антимата.
diff --git a/src/game/ChatLexicsCutter.cpp b/src/game/ChatLexicsCutter.cpp
index e7fa2f2..7e9c733 100644
--- a/src/game/ChatLexicsCutter.cpp
+++ b/src/game/ChatLexicsCutter.cpp
@@ -57,7 +57,7 @@ bool LexicsCutter::Read_Letter_Analogs(std::string& FileName)
std::string lanalog;
ma_file = fopen(FileName.c_str(), "rb");
-
+ if (!ma_file) return false;
while (!feof(ma_file))
{
line[0] = 0x0;
@@ -115,7 +115,7 @@ bool LexicsCutter::Read_Innormative_Words(std::string& FileName)
std::string lchar;
ma_file = fopen(FileName.c_str(), "rb");
-
+ if (!ma_file) return false;
while (!feof(ma_file))
{
line[0] = 0x0;
diff --git a/src/game/ChatLexicsCutter.cpp b/src/game/ChatLexicsCutter.cpp
index e7fa2f2..7e9c733 100644
--- a/src/game/ChatLexicsCutter.cpp
+++ b/src/game/ChatLexicsCutter.cpp
@@ -57,7 +57,7 @@ bool LexicsCutter::Read_Letter_Analogs(std::string& FileName)
std::string lanalog;
ma_file = fopen(FileName.c_str(), "rb");
-
+ if (!ma_file) return false;
while (!feof(ma_file))
{
line[0] = 0x0;
@@ -115,7 +115,7 @@ bool LexicsCutter::Read_Innormative_Words(std::string& FileName)
std::string lchar;
ma_file = fopen(FileName.c_str(), "rb");
-
+ if (!ma_file) return false;
while (!feof(ma_file))
{
line[0] = 0x0;