diff --git a/DataSpec/DNAMP1/DNAMP1.cpp b/DataSpec/DNAMP1/DNAMP1.cpp index 9d5197129..69733bc4b 100644 --- a/DataSpec/DNAMP1/DNAMP1.cpp +++ b/DataSpec/DNAMP1/DNAMP1.cpp @@ -165,6 +165,18 @@ void PAKBridge::build() areaDeps.layers.emplace_back(); Area::Layer& layer = areaDeps.layers.back(); layer.name = LayerName(mlvl.layerNames[layerIdx++]); + /* Trim possible trailing whitespace */ + if (layer.name.size()) + { +#if HECL_UCS2 + while (iswblank(layer.name.back())) + layer.name.pop_back(); +#else + while (isblank(layer.name.back())) + layer.name.pop_back(); +#endif + } + layer.resources.reserve(area.depLayers[l] - r); for (; r