diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 54e800a04..a92f238bc 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -210,6 +210,7 @@ poison gas clouds located over known but unlit pools were visible as known after the wish parsing change, wishing for "" or for "" worked as intended but wishing for "" (where used the canonical spelling) triggered a crash +fix new "objects[0] class #1 not in order!" panic if plain 'char' is unsigned tty: redraw unexplored locations as S_unexplored rather than after map has been partially overwritten by popup menu or text display tty: previous change resulted in remnants of previous level being shown on diff --git a/src/o_init.c b/src/o_init.c index be169843d..8bce36391 100644 --- a/src/o_init.c +++ b/src/o_init.c @@ -108,8 +108,8 @@ boolean domaterial; void init_objects() { - int i, first, last, sum; - char oclass, prevoclass; + int i, first, last, sum, prevoclass; + char oclass; #ifdef TEXTCOLOR #define COPY_OBJ_DESCR(o_dst, o_src) \ o_dst.oc_descr_idx = o_src.oc_descr_idx, o_dst.oc_color = o_src.oc_color @@ -138,7 +138,7 @@ init_objects() * earlier class would involve switching back to a lower class * number after having moved on to one or more other classes. */ - if (oclass < prevoclass) + if ((int) oclass < prevoclass) panic("objects[%d] class #%d not in order!", first, oclass); last = first + 1; @@ -181,7 +181,7 @@ init_objects() if (sum != 1000) error("init-prob error for class %d (%d%%)", oclass, sum); first = last; - prevoclass = oclass; + prevoclass = (int) oclass; } /* extra entry allows deriving the range of a class via bases[class] through bases[class+1]-1 for all classes */