1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-23 06:29:11 +00:00

Fix 9e32c618: network revision was always empty (#9419)

Shadowing the variable you intend to write in tends to do that ;)
This commit is contained in:
Patric Stout
2021-07-08 12:29:16 +02:00
committed by GitHub
parent a7fabe497c
commit 852e056d6f

View File

@@ -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);