Skip to content

Commit

Permalink
Merge pull request #56 from AllegianceZone/FixStringCompare
Browse files Browse the repository at this point in the history
Fixes a crash in MdlEdit
  • Loading branch information
ImagoTrigger committed Aug 14, 2017
2 parents 6b230ab + 800dd9f commit b707b8f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/engine/modeler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2190,7 +2190,7 @@ class ModelerImpl : public Modeler {
HANDLE hFind;
WIN32_FIND_DATAA findFileData;

m_vStyleHudName.PushEnd("Default");
m_vStyleHudName.PushEnd(ZString("Default"));

ZString hudpath = GetArtPath() + "/Mods/*";

Expand Down
2 changes: 1 addition & 1 deletion src/mdledit/mdledit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ class MDLEditWindow :

//imago 10/14 - turkey's change to modeler breaks when no hud index is set (go figure)
GetModeler()->BuildHudList();
GetModeler()->SetStyleHud("SoftwareHUD");
GetModeler()->SetStyleHud("Software"); // "SoftwareHUD does not exist

// load the fonts
TrekResources::Initialize(GetModeler());
Expand Down
6 changes: 3 additions & 3 deletions src/zlib/tlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ class TList : public TListImpl {
ListNode* pfind = GetFirst();

while (pfind) {
if (m_fnEquals(((const TValue&)pfind->m_value), value)) {
return pfind;
}
if (m_fnEquals(((const TValue&)pfind->m_value), value)) {
return pfind;
}
pfind = pfind->GetNext();
}

Expand Down
4 changes: 2 additions & 2 deletions src/zlib/tvector.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

template<
class TValue,
class EqualsFunctionType = DefaultNoEquals,
class EqualsFunctionType = DefaultEquals,
class CompareFunctionType = DefaultNoCompare
>
class TVector {
Expand Down Expand Up @@ -349,7 +349,7 @@ class TVector {
int Find(const TValue& value)
{
for (int index = 0; index < m_count; index++) {
if (m_fnEquals(((const TValue&)m_pvalue[index]), value)) {
if (m_fnEquals(((const TValue&)m_pvalue[index]), value)) {
return index;
}
}
Expand Down

0 comments on commit b707b8f

Please sign in to comment.