Merge branch 't800' into 'master'

Keep only one '\0' in NIF strings (bug #6473)

Closes #6473

See merge request OpenMW/openmw!1458
switch-to-ppa
psi29a 3 years ago
commit 59ab947f3b

@ -88,6 +88,7 @@
Bug #6429: Wyrmhaven: Can't add AI packages to player
Bug #6433: Items bound to Quick Keys sometimes do not appear until the Quick Key menu is opened
Bug #6451: Weapon summoned from Cast When Used item will have the name "None"
Bug #6473: Strings from NIF should be parsed only to first null terminator
Feature #890: OpenMW-CS: Column filtering
Feature #1465: "Reset" argument for AI functions
Feature #2554: Modifying an object triggers the instances table to scroll to the corresponding record

@ -149,6 +149,9 @@ public:
inp->read(str.data(), length);
if (inp->bad())
throw std::runtime_error("Failed to read sized string of " + std::to_string(length) + " chars");
size_t end = str.find('\0');
if (end != std::string::npos)
str.erase(end);
return str;
}
///Read in a string of the length specified in the file

Loading…
Cancel
Save