OSDN Git Service

add type casting for fprintf
[hengband/hengband.git] / src / xtra1.c
index 12ec3fa..39e13b6 100644 (file)
@@ -932,7 +932,7 @@ static void prt_hp(void)
        put_str("HP", ROW_CURHP, COL_CURHP);
 
        /* ¸½ºß¤Î¥Ò¥Ã¥È¥Ý¥¤¥ó¥È */
-       sprintf(tmp, "%4ld", p_ptr->chp);
+       sprintf(tmp, "%4ld", (long int)p_ptr->chp);
 
        if (p_ptr->chp >= p_ptr->mhp)
        {
@@ -953,7 +953,7 @@ static void prt_hp(void)
        put_str( "/", ROW_CURHP, COL_CURHP + 7 );
 
        /* ºÇÂç¥Ò¥Ã¥È¥Ý¥¤¥ó¥È */
-       sprintf(tmp, "%4ld", p_ptr->mhp);
+       sprintf(tmp, "%4ld", (long int)p_ptr->mhp);
        color = TERM_L_GREEN;
 
        c_put_str(color, tmp, ROW_CURHP, COL_CURHP + 8 );
@@ -983,7 +983,7 @@ static void prt_sp(void)
 #endif
 
        /* ¸½ºß¤Î¥Þ¥¸¥Ã¥¯¥Ý¥¤¥ó¥È */
-       sprintf(tmp, "%4ld", p_ptr->csp);
+       sprintf(tmp, "%4ld", (long int)p_ptr->csp);
 
        if (p_ptr->csp >= p_ptr->msp)
        {
@@ -1004,7 +1004,7 @@ static void prt_sp(void)
        put_str( "/", ROW_CURSP, COL_CURSP + 7 );
 
        /* ºÇÂç¥Þ¥¸¥Ã¥¯¥Ý¥¤¥ó¥È */
-       sprintf(tmp, "%4ld", p_ptr->msp);
+       sprintf(tmp, "%4ld", (long int)p_ptr->msp);
        color = TERM_L_GREEN;
 
        c_put_str(color, tmp, ROW_CURSP, COL_CURSP + 8);