Fix charmap state output for inherited characters

This commit is contained in:
Rangi42
2024-08-09 22:13:43 -04:00
parent b987e5669f
commit c42e856efb

View File

@@ -71,10 +71,12 @@ void charmap_New(std::string const &name, std::string const *baseName) {
charmapMap[name] = charmapList.size(); charmapMap[name] = charmapList.size();
Charmap &charmap = charmapList.emplace_back(); Charmap &charmap = charmapList.emplace_back();
if (baseIdx != (size_t)-1) if (baseIdx != (size_t)-1) {
charmap.nodes = charmapList[baseIdx].nodes; // Copies `charmapList[baseIdx].nodes` charmap.nodes = charmapList[baseIdx].nodes; // Copies `charmapList[baseIdx].nodes`
else charmap.mappings = charmapList[baseIdx].mappings; // Copies `charmapList[baseIdx].mappings`
} else {
charmap.nodes.emplace_back(); // Zero-init the root node charmap.nodes.emplace_back(); // Zero-init the root node
}
charmap.name = name; charmap.name = name;