From 75c4a2d2fb4c400eb2eef6e1e1fa1bf3573c5be0 Mon Sep 17 00:00:00 2001 From: yexo Date: Sat, 31 Jul 2010 09:35:49 +0000 Subject: (svn r20251) -Add: [NewGRF] allow grfs to specify the number of valid parameters --- src/newgrf_config.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/newgrf_config.cpp') diff --git a/src/newgrf_config.cpp b/src/newgrf_config.cpp index 74c526b93..d7769a394 100644 --- a/src/newgrf_config.cpp +++ b/src/newgrf_config.cpp @@ -26,7 +26,8 @@ * @param filename Set the filename of this GRFConfig to filename. The argument * is copied so the original string isn't needed after the constructor. */ -GRFConfig::GRFConfig(const char *filename) +GRFConfig::GRFConfig(const char *filename) : + num_valid_params(lengthof(param)) { if (filename != NULL) this->filename = strdup(filename); } @@ -41,6 +42,7 @@ GRFConfig::GRFConfig(const GRFConfig &config) : status(config.status), grf_bugs(config.grf_bugs), num_params(config.num_params), + num_valid_params(config.num_valid_params), windows_paletted(config.windows_paletted) { MemCpyT(this->original_md5sum, config.original_md5sum, lengthof(this->original_md5sum)); -- cgit v1.2.3-54-g00ecf