Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ This page lists all the individual contributions to the project by their author.
- **E1 Elite** - TileSet 255 and above bridge repair fix
- **AutoGavy** - interceptor logic, Warhead critical hit logic
- **Chasheen (Chasheenburg)** - CN docs help for Build#24
- **Noble Fish** - some minor fixes, established Community Chinese docs, took over and completely rewrite the Official Chinese docs during Build#46
- **Noble Fish** - some minor improvements and fixes, established Community Chinese docs, took over and completely rewrite the Official Chinese docs during Build#46
- **tomsons26** - all-around help, assistance and guidance in reverse-engineering, YR binary mappings
- **CCHyper** - all-around help, current project logo, assistance and guidance in reverse-engineering, YR binary mappings, custom locomotors example implementation
- **AlexB** - Original FlyingStrings implementation
Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ Phobos fixes:
- Fixed `AltNextScenario` not taking effect (by FlyStar)
- Fixed `DefaultDisguise` showing wrong house colors for different players (by NetsuNegi & Ollerus)
- `600 The shield of the attached object is broken` bug fix for the triggered event (by FlyStar)
- Fixed a read bug when setting the SHP file name in INI (By Noble_Fish)

Fixes / interactions with other extensions:
- Weapons fired by EMPulse superweapons *(Ares feature)* now fully respect the firing building's FLH (by Starkku)
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/Constructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ bool TheaterSpecificSHP::Read(INI_EX& parser, const char* pSection, const char*
GeneralUtils::ApplyTheaterSuffixToString(pValue);

std::string Result = pValue;
if (!strstr(pValue, ".shp"))
if (Result.size() < 4 || !std::equal(Result.end() - 4, Result.end(), ".shp", [](char input, char expected) { return std::tolower(input) == expected; }))
Result += ".shp";

if (auto const pImage = FileSystem::LoadSHPFile(Result.c_str()))
Expand Down
2 changes: 1 addition & 1 deletion src/Utilities/TemplateDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ namespace detail
auto const pValue = parser.value();
std::string Result = pValue;

if (!strstr(pValue, ".shp"))
if (Result.size() < 4 || !std::equal(Result.end() - 4, Result.end(), ".shp", [](char input, char expected) { return std::tolower(input) == expected; }))
Result += ".shp";

if (auto const pImage = FileSystem::LoadSHPFile(Result.c_str()))
Expand Down
Loading