mirror of https://github.com/AxioDL/metaforce.git
chomping trailing whitespace for directory name use
This commit is contained in:
parent
1e3d281136
commit
2417eef951
|
@ -136,6 +136,18 @@ void PAKBridge::build()
|
||||||
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
|
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
|
||||||
areaName.read(rs);
|
areaName.read(rs);
|
||||||
areaDeps.name = areaName.getSystemString(FOURCC('ENGL'), 0);
|
areaDeps.name = areaName.getSystemString(FOURCC('ENGL'), 0);
|
||||||
|
|
||||||
|
/* Trim possible trailing whitespace */
|
||||||
|
if (areaDeps.name.size())
|
||||||
|
{
|
||||||
|
#if HECL_UCS2
|
||||||
|
while (iswblank(areaDeps.name.back()))
|
||||||
|
areaDeps.name.pop_back();
|
||||||
|
#else
|
||||||
|
while (isblank(areaDeps.name.back()))
|
||||||
|
areaDeps.name.pop_back();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (areaDeps.name.empty())
|
if (areaDeps.name.empty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -135,6 +135,18 @@ void PAKBridge::build()
|
||||||
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
|
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
|
||||||
areaName.read(rs);
|
areaName.read(rs);
|
||||||
areaDeps.name = areaName.getSystemString(FOURCC('ENGL'), 0);
|
areaDeps.name = areaName.getSystemString(FOURCC('ENGL'), 0);
|
||||||
|
|
||||||
|
/* Trim possible trailing whitespace */
|
||||||
|
if (areaDeps.name.size())
|
||||||
|
{
|
||||||
|
#if HECL_UCS2
|
||||||
|
while (iswblank(areaDeps.name.back()))
|
||||||
|
areaDeps.name.pop_back();
|
||||||
|
#else
|
||||||
|
while (isblank(areaDeps.name.back()))
|
||||||
|
areaDeps.name.pop_back();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (areaDeps.name.empty())
|
if (areaDeps.name.empty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue