OSDN Git Service

(2.2.0.8) #37304 デバッグスポイラー出力時のisctype.cでのAssertionによるランタイムエラーを対策。 / Fix runtime error...
authorDeskull <desull@users.sourceforge.jp>
Thu, 22 Jun 2017 14:32:15 +0000 (23:32 +0900)
committerDeskull <desull@users.sourceforge.jp>
Thu, 22 Jun 2017 14:32:15 +0000 (23:32 +0900)
src/defines.h
src/h-type.h
src/wizard1.c

index 233db05..8d4a9a8 100644 (file)
@@ -53,7 +53,7 @@
 #define FAKE_VER_MAJOR 12 /*!< ゲームのバージョン番号定義(メジャー番号 + 10) */
 #define FAKE_VER_MINOR 2 /*!< ゲームのバージョン番号定義(マイナー番号) */
 #define FAKE_VER_PATCH 0 /*!< ゲームのバージョン番号定義(パッチ番号) */
-#define FAKE_VER_EXTRA 7 /*!< ゲームのバージョン番号定義(エクストラ番号) */
+#define FAKE_VER_EXTRA 8 /*!< ゲームのバージョン番号定義(エクストラ番号) */
 
 /*!
  * @brief セーブファイル上のバージョン定義(メジャー番号) / "Savefile Version Number" for Hengband 1.1.1 and later
@@ -71,7 +71,7 @@
 #define H_VER_MAJOR 2 /*!< セーブファイル上のバージョン定義(メジャー番号) */
 #define H_VER_MINOR 2 /*!< セーブファイル上のバージョン定義(マイナー番号) */
 #define H_VER_PATCH 0 /*!< セーブファイル上のバージョン定義(パッチ番号) */
-#define H_VER_EXTRA 7 /*!< セーブファイル上のバージョン定義(エクストラ番号) */
+#define H_VER_EXTRA 8 /*!< セーブファイル上のバージョン定義(エクストラ番号) */
 
 #define ANGBAND_2_8_1 /*!< Angband 2.8.1以降から有効な処理分岐を定義 */
 #define ZANGBAND /*!< Zangband 以降から有効な処理分岐を定義 */
index 55e8e5e..ddccc36 100644 (file)
 #include <stdint.h>
 #endif
 
-/*** Special 4 letter names for some standard types ***/
+/*** Special 4-5 letter names for some standard types ***/
 
 typedef void *vptr;       /*!< void型ポインタ定義 / A standard pointer (to "void" because ANSI C says so) */
 typedef const char *cptr; /*!< 文字列定数用ポインタ定義 / A simple pointer (to unmodifiable strings) */
+typedef const unsigned char *ucptr; /*!< 非負文字列定数用ポインタ定義 / A simple pointer (to unmodifiable strings) */
 typedef double real;      /*!< doubleをreal型として定義 / Since float's are silly, hard code real numbers as doubles */
 
 
index 3b1e24f..9937962 100644 (file)
@@ -1921,19 +1921,19 @@ static void spoil_out(cptr str)
        cptr r;
 
        /* Line buffer */
-       static char roff_buf[256];
+       static unsigned char roff_buf[256];
 
        /* Delay buffer */
-       static char roff_waiting_buf[256];
+       static unsigned char roff_waiting_buf[256];
 
 #ifdef JP
        bool iskanji_flag = FALSE;
 #endif
        /* Current pointer into line roff_buf */
-       static char *roff_p = roff_buf;
+       static unsigned char *roff_p = roff_buf;
 
        /* Last space saved into roff_buf */
-       static char *roff_s = NULL;
+       static unsigned char *roff_s = NULL;
 
        /* Mega-Hack -- Delayed output */
        static bool waiting_output = FALSE;
@@ -1967,10 +1967,10 @@ static void spoil_out(cptr str)
        for (; *str; str++)
        {
 #ifdef JP
-               char cbak;
+               unsigned char cbak;
                bool k_flag = iskanji((unsigned char)(*str));
 #endif
-               char ch = *str;
+               unsigned char ch = *str;
                bool wrap = (ch == '\n');
 
 #ifdef JP
@@ -2002,9 +2002,9 @@ static void spoil_out(cptr str)
 #ifdef JP
                                bool k_flag_local;
                                bool iskanji_flag_local = FALSE;
-                               cptr tail = str + (k_flag ? 2 : 1);
+                               ucptr tail = str + (k_flag ? 2 : 1);
 #else
-                               cptr tail = str + 1;
+                               ucptr tail = str + 1;
 #endif
 
                                for (; *tail; tail++)