Skip to content

Commit

Permalink
Fix maybe uninitialised warning in DrawDeparturesListItems
Browse files Browse the repository at this point in the history
  • Loading branch information
JGRennison committed Jul 30, 2023
1 parent 4c88256 commit 4d2db01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/departures_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ void DeparturesWindow<Twaypoint>::DrawDeparturesListItems(const Rect &r) const
}
}

char buf[256];
char buf[256] = "";
int64 args_array[] = { Waypoint::IsValidID(id) ? STR_WAYPOINT_NAME : STR_STATION_NAME, id, icon_via };
StringParameters tmp_params(args_array);
char *end = GetStringWithArgs(buf, STR_DEPARTURES_VIA_DESCRIPTOR, &tmp_params, lastof(buf));
Expand All @@ -887,7 +887,7 @@ void DeparturesWindow<Twaypoint>::DrawDeparturesListItems(const Rect &r) const
if (via2 != INVALID_STATION) {
get_single_via_string(1, via2);

char buf[512];
char buf[512] = "";
int64 args_array[] = { SPECSTR_TEMP_START, SPECSTR_TEMP_START + 1 };
StringParameters tmp_params(args_array);
char *end = GetStringWithArgs(buf, STR_DEPARTURES_VIA_AND, &tmp_params, lastof(buf));
Expand Down

0 comments on commit 4d2db01

Please sign in to comment.