mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 16:20:21 +00:00
Merge branch 't800' into 'master'
Keep only one '\0' in NIF strings (bug #6473) Closes #6473 See merge request OpenMW/openmw!1458
This commit is contained in:
commit
59ab947f3b
@ -88,6 +88,7 @@
|
|||||||
Bug #6429: Wyrmhaven: Can't add AI packages to player
|
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 #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 #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 #890: OpenMW-CS: Column filtering
|
||||||
Feature #1465: "Reset" argument for AI functions
|
Feature #1465: "Reset" argument for AI functions
|
||||||
Feature #2554: Modifying an object triggers the instances table to scroll to the corresponding record
|
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);
|
inp->read(str.data(), length);
|
||||||
if (inp->bad())
|
if (inp->bad())
|
||||||
throw std::runtime_error("Failed to read sized string of " + std::to_string(length) + " chars");
|
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;
|
return str;
|
||||||
}
|
}
|
||||||
///Read in a string of the length specified in the file
|
///Read in a string of the length specified in the file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user