Skip to content

Commit

Permalink
sync with libsundaowen_src
Browse files Browse the repository at this point in the history
  • Loading branch information
dnasdw committed May 25, 2019
1 parent 21a2b05 commit e31a569
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 27 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if(APPLE)
endif()
set(_3DSTOOL_MAJOR 1)
set(_3DSTOOL_MINOR 2)
set(_3DSTOOL_PATCHLEVEL 5)
set(_3DSTOOL_PATCHLEVEL 6)
if(NOT MSVC_IDE AND NOT XCODE_VERSION AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
endif()
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ An all-in-one tool for extracting/creating 3ds roms.
- v1.2.3 @ 2018.09.03 - Fix extract cxi without exefs bug
- v1.2.4 @ 2019.03.28 - Improve lock region
- v1.2.5 @ 2019.04.20 - Fix extract exefs without exefs-dir bug
- v1.2.6 @ 2019.05.25 - Sync with libsundaowen_src

### v1.1

Expand Down
4 changes: 4 additions & 0 deletions bin/ext_key.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,7 @@
00040000001C0800 11B5116D0D352DA9273CC1F5285581AF
00040000001C0900 68983CB2C595FCA3437E21A450EC7961
00040000001C0A00 BDEABDA61114C66E270C095724C7FEE8
00040000001C0B00 337E15A572F8ACCF07A732A46D7955B4
00040000001C0D00 10D3EC899520A290B36CB2C03D2F6F96
00040000001C0E00 3965CADA8B34D1DCB93733EF7604B0A0
00040000001C0F00 008BB1FDEF704045434C9933B0DB69B9
Expand Down Expand Up @@ -1397,6 +1398,7 @@
00040000001CD900 B71BB287BAE85D3620F422EC6D694E15
00040000001CDD00 E9BDC86CAE90B6BC9AFAD809FDF44BEF
00040000001CDE00 6563EB16B265D6F6237C2B4F5234C321
00040000001CDF00 0B94739B63E1058B5FCAD795DB566AE3
00040000001CE000 B9C2D4CFDD33FEC7A65A5BC474A7AE1D
00040000001CE100 71D654EAA1A6B322D23D36B8A91A4201
00040000001CE800 BA12D61C0947FE59A22CC94EB32D3B5A
Expand Down Expand Up @@ -1462,6 +1464,7 @@
00040000001D3E00 9A616CF2F3DA6848EA1294283A4E8E13
00040000001D3F00 1A82A36C84C2ECF1933D6156D7E3F333
00040000001D4000 80CA8BB3E11F631F01E7540AA3454CAE
00040000001D4100 174DE15226508C9460F23A68D5A37EB5
00040000001D4500 9F62F7E161D51974F2CCE8B860CE749F
00040000001D4C00 DAC522C7FA4B8E1F3ED9D78A424624C9
00040000001D4E00 227757FFA5299D99F4D47DCBBB96CB67
Expand Down Expand Up @@ -1493,6 +1496,7 @@
00040000001D7300 4245F9F8820DFFCD18020FC5A7A9FFE9
00040000001D7400 BC02E6103907A3604599573F37FE73EC
00040000001D7500 E63BDD6E998EC03E75E0B0AD4AE9208A
00040000001D7600 1D367936B876528FEB7D22C1F33592CA
00040000001D7800 EB704CAC88F3CFF78B27F268C679CB1A
00040000001D7D00 14A95854B221AA65D740FDD4682DF318
00040000001D7E00 1D2C4FD379D03B2881AEA20BD5EA6081
Expand Down
2 changes: 1 addition & 1 deletion src/romfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ void CRomFs::buildIgnoreList()
if (StartWith(sTxt, "//"))
{
vector<string> vIngoreTag = Split<string>(sTxt.c_str() + strlen("//"), ":");
if (vIngoreTag.size() == 1 && EndWith(sTxt, ":"))
if (vIngoreTag.size() == 2 && vIngoreTag[1].empty())
{
vIngoreTag[0] = Trim(vIngoreTag[0]);
if (vIngoreTag[0] == "ignore")
Expand Down
56 changes: 31 additions & 25 deletions src/utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,21 +359,24 @@ template<typename T>
vector<T> Split(const T& a_sString, const T& a_sSeparator)
{
vector<T> vString;
for (typename T::size_type uOffset = 0; uOffset < a_sString.size(); uOffset += a_sSeparator.size())
if (a_sSeparator.size() != 0)
{
typename T::size_type uPos = a_sString.find(a_sSeparator, uOffset);
if (uPos != T::npos)
for (typename T::size_type uOffset = 0; uOffset <= a_sString.size(); uOffset += a_sSeparator.size())
{
vString.push_back(a_sString.substr(uOffset, uPos - uOffset));
uOffset = uPos;
}
else
{
vString.push_back(a_sString.substr(uOffset));
break;
typename T::size_type uPos = a_sString.find(a_sSeparator, uOffset);
if (uPos != T::npos)
{
vString.push_back(a_sString.substr(uOffset, uPos - uOffset));
uOffset = uPos;
}
else
{
vString.push_back(a_sString.substr(uOffset));
break;
}
}
}
if (vString.empty())
else
{
vString.push_back(a_sString);
}
Expand All @@ -399,21 +402,24 @@ template<typename T>
vector<T> SplitOf(const T& a_sString, const T& a_sSeparatorSet)
{
vector<T> vString;
for (typename T::const_iterator it = a_sString.begin(); it != a_sString.end(); ++it)
if (a_sSeparatorSet.size() != 0)
{
typename T::const_iterator itPos = find_first_of(it, a_sString.end(), a_sSeparatorSet.begin(), a_sSeparatorSet.end());
if (itPos != a_sString.end())
for (typename T::size_type uOffset = 0; uOffset <= a_sString.size(); uOffset++)
{
vString.push_back(a_sString.substr(it - a_sString.begin(), itPos - it));
it = itPos;
}
else
{
vString.push_back(a_sString.substr(it - a_sString.begin()));
break;
typename T::size_type uPos = a_sString.find_first_of(a_sSeparatorSet, uOffset);
if (uPos != T::npos)
{
vString.push_back(a_sString.substr(uOffset, uPos - uOffset));
uOffset = uPos;
}
else
{
vString.push_back(a_sString.substr(uOffset));
break;
}
}
}
if (vString.empty())
else
{
vString.push_back(a_sString);
}
Expand All @@ -436,9 +442,9 @@ vector<T> SplitOf(const T& a_sString, const typename T::value_type* a_pSeparator
}

template<typename T>
bool StartWith(const T& a_sString, const T& a_sPrefix, u32 a_uStart = 0)
bool StartWith(const T& a_sString, const T& a_sPrefix, typename T::size_type a_uStart = 0)
{
if (a_uStart > static_cast<u32>(a_sString.size()))
if (a_uStart > a_sString.size())
{
return false;
}
Expand All @@ -449,7 +455,7 @@ bool StartWith(const T& a_sString, const T& a_sPrefix, u32 a_uStart = 0)
}

template<typename T>
bool StartWith(const T& a_sString, const typename T::value_type* a_pPrefix, u32 a_uStart = 0)
bool StartWith(const T& a_sString, const typename T::value_type* a_pPrefix, typename T::size_type a_uStart = 0)
{
if (a_pPrefix == nullptr)
{
Expand Down

0 comments on commit e31a569

Please sign in to comment.