summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2018-05-16 21:26:41 +0100
committerfrosch <github@elsenhans.name>2018-06-27 22:54:46 +0200
commit2aacddd4123a45e386cde7445e1fa7b8cf60a222 (patch)
tree34aab5730f8379fa62ecf521f4a36a4ce20c3ea1 /src/saveload
parent5f86e1a390b4aa9510d43f97251484ca67934f1c (diff)
downloadopenttd-2aacddd4123a45e386cde7445e1fa7b8cf60a222.tar.xz
Codechange: lengthof is not defined for runtime-length strings, use sizeof instead
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h
index d492558c5..3405f3351 100644
--- a/src/saveload/saveload.h
+++ b/src/saveload/saveload.h
@@ -436,7 +436,7 @@ typedef SaveLoad SaveLoadGlobVarList;
* @param variable Name of the global variable.
* @param type Storage of the data in memory and in the savegame.
*/
-#define SLEG_STR(variable, type) SLEG_CONDSTR(variable, type, lengthof(variable), 0, SL_MAX_VERSION)
+#define SLEG_STR(variable, type) SLEG_CONDSTR(variable, type, sizeof(variable), 0, SL_MAX_VERSION)
/**
* Storage of a global list in every savegame version.