chomping trailing whitespace for directory name use

This commit is contained in:
Jack Andersen 2015-08-31 15:23:05 -10:00
parent 1e3d281136
commit 2417eef951
2 changed files with 24 additions and 0 deletions

View File

@ -136,6 +136,18 @@ void PAKBridge::build()
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
areaName.read(rs);
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())
{

View File

@ -135,6 +135,18 @@ void PAKBridge::build()
PAKEntryReadStream rs = areaNameEnt->beginReadStream(m_node);
areaName.read(rs);
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())
{