mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-24 12:44:10 +01:00
(svn r26541) [1.4] -Backport from trunk:
- Fix: Prevent comparing to NULL when strndup could not allocate memory (r26476) - Fix: Potentially undefined shifts in NewGRF code (r26475) - Fix: Make sure there is no uninitialised sprite data (r26473) - Fix: Draw text shadow for ellipses (r26467) - Fix: Add special handling for PALETTE_CRASH to work for non-8bpp-mapped sprites (r26463)
This commit is contained in:
@@ -63,7 +63,8 @@ IniGroup::IniGroup(IniLoadFile *parent, const char *name, size_t len) : next(NUL
|
||||
if (len == 0) len = strlen(name);
|
||||
|
||||
this->name = strndup(name, len);
|
||||
if (this->name != NULL) str_validate(this->name, this->name + len);
|
||||
if (this->name == NULL) error("not enough memory to allocate group name");
|
||||
str_validate(this->name, this->name + len);
|
||||
|
||||
this->last_item = &this->item;
|
||||
*parent->last_group = this;
|
||||
|
||||
Reference in New Issue
Block a user