(svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL)
This commit is contained in:
@@ -416,7 +416,7 @@ CommandCost CmdRenameWaypoint(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
|
||||
|
||||
if (flags & DC_EXEC) {
|
||||
free(wp->name);
|
||||
wp->name = reset ? NULL : strdup(text);
|
||||
wp->name = reset ? NULL : stredup(text);
|
||||
|
||||
wp->UpdateVirtCoord();
|
||||
}
|
||||
|
Reference in New Issue
Block a user