From 852e056d6f47a913ee0e13f1779910e18dbf97b7 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Thu, 8 Jul 2021 12:29:16 +0200 Subject: Fix 9e32c618: network revision was always empty (#9419) Shadowing the variable you intend to write in tends to do that ;) --- src/network/core/game_info.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/core/game_info.cpp b/src/network/core/game_info.cpp index a52de6c18..b4c487fba 100644 --- a/src/network/core/game_info.cpp +++ b/src/network/core/game_info.cpp @@ -43,7 +43,7 @@ std::string_view GetNetworkRevisionString() static std::string network_revision; if (network_revision.empty()) { - std::string network_revision = _openttd_revision; + network_revision = _openttd_revision; if (_openttd_revision_tagged) { /* Tagged; do not mangle further, though ensure it's not too long. */ if (network_revision.size() >= NETWORK_REVISION_LENGTH) network_revision.resize(NETWORK_REVISION_LENGTH - 1); -- cgit v1.2.3-54-g00ecf