diff --git a/src/common/util/base36.c b/src/common/util/base36.c index b55718afb..80ec066e2 100644 --- a/src/common/util/base36.c +++ b/src/common/util/base36.c @@ -40,10 +40,11 @@ atoi36(const char * str) if (isupper((int)*s)) i = i*36 + (*s)-'A' + 10; else if (islower((int)*s)) i=i*36 + (*s)-'a' + 10; else if (isdigit((int)*s)) i=i*36 + (*s)-'0'; - else return 0; + else + break; ++s; } - if (i<0 || (!isspace(*s) && *s!='\0')) return 0; + if (i<0) return 0; return i; } diff --git a/src/mapper/map_modify.c b/src/mapper/map_modify.c index 8d79ab58f..f5caf51e2 100644 --- a/src/mapper/map_modify.c +++ b/src/mapper/map_modify.c @@ -624,7 +624,7 @@ NeueBurg(region * r) b = new_building(bt_find(oldbuildings[q]), r, NULL); - b->size = map_input(win, 2, 2, "Größe", 1, 999, 1); + b->size = map_input(win, 2, 2, "Grösse", 1, 99999, 1); strcpy(buf, my_input(win, 2, 3, "Name: ", NULL)); if (strlen(buf) > 0) diff --git a/src/mapper/map_units.c b/src/mapper/map_units.c index 9ee9aa27b..4b0b22714 100644 --- a/src/mapper/map_units.c +++ b/src/mapper/map_units.c @@ -1206,7 +1206,7 @@ showunits(region * r) modified = 1; if ((s = strchr(pointer->s, '('))!=NULL) { s++; - f = atoi(s); + f = atoi36(s); switch (pointer->s[0]) { case '\002': b = findbuilding(f); @@ -1414,7 +1414,7 @@ showunits(region * r) clipregion = r; break; case '\002': - f = atoi(s); + f = atoi36(s); b = findbuilding(f); for (x = r->units; x; x = x->next) if (x->building == b && fval(x, FL_OWNER)) diff --git a/src/mapper/mapper.c b/src/mapper/mapper.c index 1cdc6fd73..8a8fa7273 100644 --- a/src/mapper/mapper.c +++ b/src/mapper/mapper.c @@ -1055,6 +1055,7 @@ movearound(int rx, int ry) { break; case 0x2: make_ocean_block(rx, ry); + modified = 1; ch = -9; break; case 'a':