OSDN Git Service

update year to 2020
[jnethack/source.git] / src / shknam.c
index ab94f2a..071fcd0 100644 (file)
@@ -7,7 +7,7 @@
 
 /* JNetHack Copyright */
 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000  */
-/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2019            */
+/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2020            */
 /* JNetHack may be freely redistributed.  See license for details. */
 
 #include "hack.h"
@@ -499,7 +499,7 @@ boolean mkspecl;
     int atype;
 
     /* 3.6 tribute */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
     if (mkspecl && (!strcmp(shp->name, "rare books")
                     || !strcmp(shp->name, "second-hand bookstore"))) {
 #else
@@ -648,6 +648,7 @@ struct mkroom *sroom;
     /* check that the shopkeeper placement is sane */
     if (sroom->irregular) {
         int rmno = (int) ((sroom - rooms) + ROOMOFFSET);
+
         if (isok(sx - 1, sy) && !levl[sx - 1][sy].edge
             && (int) levl[sx - 1][sy].roomno == rmno)
             sx--;
@@ -659,18 +660,18 @@ struct mkroom *sroom;
             sy--;
         else if (isok(sx, sy + 1) && !levl[sx][sy + 1].edge
                  && (int) levl[sx][sy + 1].roomno == rmno)
-            sx++;
+            sy++;
         else
             goto shk_failed;
-    } else if (sx == sroom->lx - 1)
+    } else if (sx == sroom->lx - 1) {
         sx++;
-    else if (sx == sroom->hx + 1)
+    } else if (sx == sroom->hx + 1) {
         sx--;
-    else if (sy == sroom->ly - 1)
+    } else if (sy == sroom->ly - 1) {
         sy++;
-    else if (sy == sroom->hy + 1)
+    } else if (sy == sroom->hy + 1) {
         sy--;
-    else {
+    else {
     shk_failed:
 #ifdef DEBUG
         /* Said to happen sometimes, but I have never seen it. */