diff --git a/source/common/engine/stringtable.cpp b/source/common/engine/stringtable.cpp index eea149ef0..a666a4d9c 100644 --- a/source/common/engine/stringtable.cpp +++ b/source/common/engine/stringtable.cpp @@ -513,6 +513,26 @@ size_t FStringTable::ProcessEscapes (char *iptr) c = '\r'; else if (c == 't') c = '\t'; + else if (c == 'x') + { + c = 0; + for (int i = 0; i < 2; i++) + { + char cc = *iptr++; + if (cc >= '0' && cc <= '9') + c = (c << 4) + cc - '0'; + else if (cc >= 'a' && cc <= 'f') + c = (c << 4) + 10 + cc - 'a'; + else if (cc >= 'A' && cc <= 'F') + c = (c << 4) + 10 + cc - 'A'; + else + { + iptr--; + break; + } + } + if (c == 0) continue; + } else if (c == '\n') continue; } diff --git a/source/common/scripting/backend/codegen.cpp b/source/common/scripting/backend/codegen.cpp index eaafaba98..2b4b1eab4 100644 --- a/source/common/scripting/backend/codegen.cpp +++ b/source/common/scripting/backend/codegen.cpp @@ -2170,7 +2170,6 @@ FxExpression *FxPreIncrDecr::Resolve(FCompileContext &ctx) ExpEmit FxPreIncrDecr::Emit(VMFunctionBuilder *build) { assert(Token == TK_Incr || Token == TK_Decr); - assert(ValueType == Base->ValueType && IsNumeric()); int zero = build->GetConstantInt(0); int regtype = ValueType->GetRegType(); @@ -2257,7 +2256,6 @@ FxExpression *FxPostIncrDecr::Resolve(FCompileContext &ctx) ExpEmit FxPostIncrDecr::Emit(VMFunctionBuilder *build) { assert(Token == TK_Incr || Token == TK_Decr); - assert(ValueType == Base->ValueType && IsNumeric()); int zero = build->GetConstantInt(0); int regtype = ValueType->GetRegType(); @@ -5261,7 +5259,6 @@ FxExpression *FxMinMax::Resolve(FCompileContext &ctx) else { ExpVal value = static_cast(choices[j])->GetValue(); - assert(value.Type == ValueType); if (Type == NAME_Min) { if (value.Type->GetRegType() == REGT_FLOAT) diff --git a/source/common/statusbar/base_sbar.cpp b/source/common/statusbar/base_sbar.cpp index 5e29ae0db..32cd341ed 100644 --- a/source/common/statusbar/base_sbar.cpp +++ b/source/common/statusbar/base_sbar.cpp @@ -577,10 +577,6 @@ void DStatusBarCore::DrawGraphic(FGameTexture* tex, double x, double y, int flag x += orgx; y += orgy; } - if (clipwidth != -1) - { - int a = 0; - } DrawTexture(twod, tex, x, y, DTA_TopOffset, 0, DTA_LeftOffset, 0, diff --git a/source/common/utility/cmdlib.cpp b/source/common/utility/cmdlib.cpp index 72485011d..9551cbf42 100644 --- a/source/common/utility/cmdlib.cpp +++ b/source/common/utility/cmdlib.cpp @@ -331,13 +331,8 @@ FString ExtractFileBase (const char *path, bool include_extension) } #endif - if (!include_extension) + if (!include_extension && (dot = strrchr(src, '.'))) { - dot = src; - while (*dot && *dot != '.') - { - dot++; - } return FString(src, dot - src); } else