]> granicus.if.org Git - nethack/commitdiff
Fix default boulder symbol
authorPasi Kallinen <paxed@alt.org>
Thu, 18 Jun 2015 17:55:09 +0000 (20:55 +0300)
committerPasi Kallinen <paxed@alt.org>
Thu, 18 Jun 2015 17:55:19 +0000 (20:55 +0300)
Previous boulder symbol fix unearthed another problem:
When no boulder symbol was defined in config file, the default
iflags.bouldersym null value was used as a symbol.

src/drawing.c

index a78e3d5e5a31e51c50c1d321e374613c00fe172f..1a5be65be7d6bc23fcb36adc66542ab6762220e2 100644 (file)
@@ -375,7 +375,7 @@ init_showsyms()
 
     for (i = 0; i < MAXOTHER; i++) {
         if (i == SYM_BOULDER)
-            showsyms[i + SYM_OFF_X] = iflags.bouldersym;
+            showsyms[i + SYM_OFF_X] = iflags.bouldersym ? iflags.bouldersym : def_oc_syms[ROCK_CLASS].sym;
         else if (i == SYM_INVISIBLE)
             showsyms[i + SYM_OFF_X] = DEF_INVISIBLE;
     }
@@ -401,7 +401,7 @@ init_l_symbols()
 
     for (i = 0; i < MAXOTHER; i++) {
         if (i == SYM_BOULDER)
-            l_syms[i + SYM_OFF_X] = iflags.bouldersym;
+            l_syms[i + SYM_OFF_X] = iflags.bouldersym ? iflags.bouldersym : def_oc_syms[ROCK_CLASS].sym;
         else if (i == SYM_INVISIBLE)
             l_syms[i + SYM_OFF_X] = DEF_INVISIBLE;
     }
@@ -433,7 +433,7 @@ init_r_symbols()
 
     for (i = 0; i < MAXOTHER; i++) {
         if (i == SYM_BOULDER)
-            r_syms[i + SYM_OFF_X] = iflags.bouldersym;
+            r_syms[i + SYM_OFF_X] = iflags.bouldersym ? iflags.bouldersym : def_oc_syms[ROCK_CLASS].sym;
         else if (i == SYM_INVISIBLE)
             r_syms[i + SYM_OFF_X] = DEF_INVISIBLE;
     }