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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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