From: Markus Armbruster Date: Sun, 22 Feb 2015 07:04:41 +0000 (+0100) Subject: emp_config: Don't monkey-patch WORLD_X to be even X-Git-Tag: v4.3.33~30 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=e60f0be73fa496542ab8630388f7bf962a58d30d emp_config: Don't monkey-patch WORLD_X to be even emp_config() silently truncates WORLD_X to even. Drop that. We could flag odd WORLD_X as error, but we don't validate the other configuration values, so why this one? Instead document it needs to be even. WORLD_Y, too. Signed-off-by: Markus Armbruster --- diff --git a/include/econfig-spec.h b/include/econfig-spec.h index dcde56e2d..6d4983867 100644 --- a/include/econfig-spec.h +++ b/include/econfig-spec.h @@ -28,7 +28,7 @@ * * Known contributors to this file: * Marc Olzheim, 2004 - * Markus Armbruster, 2004-2014 + * Markus Armbruster, 2004-2015 */ /* @@ -108,9 +108,9 @@ EMPCFBOTH("privlog", privlog, char *, NSC_STRING, 0, EMPCFBOTH("privip", privip, char *, NSC_STRING, KM_INTERNAL, "Deities may connect from these IPs or networks, \"\" allows all") EMPCFBOTH("WORLD_X", WORLD_X, int, NSC_INT, 0, - "World size X dimension (enforced to be even by subtracting 1 if necessary)") + "World size X dimension, must be even") EMPCFBOTH("WORLD_Y", WORLD_Y, int, NSC_INT, 0, - "World size Y dimension") + "World size Y dimension, must be even") EMPCF_COMMENT("\n\n### Update policy\n\n" "# Note: the update schedule is defined in the file schedule in the\n" diff --git a/src/lib/common/emp_config.c b/src/lib/common/emp_config.c index 70b8176cf..ff698ff6a 100644 --- a/src/lib/common/emp_config.c +++ b/src/lib/common/emp_config.c @@ -138,7 +138,6 @@ emp_config(char *file) fclose(fp); done: - WORLD_X &= ~1; /* force even */ if (set_paths(file) < 0) return -1;