OSDN Git Service

add type casting for sprintf
authordis- <dis-@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 14 Jan 2013 04:57:26 +0000 (04:57 +0000)
committerdis- <dis-@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 14 Jan 2013 04:57:26 +0000 (04:57 +0000)
src/files.c
src/wizard1.c

index a0a2825..8fa8d3f 100644 (file)
@@ -1078,7 +1078,7 @@ cptr process_pref_file_expr(char **sp, char *fp)
                        /* Money */
                        else if (streq(b+1, "MONEY"))
                        {
-                               sprintf(tmp, "%09ld", p_ptr->au);
+                               sprintf(tmp, "%09ld", (long int)p_ptr->au);
                                v = tmp;
                        }
                }
index 1ddf670..27ae9c0 100644 (file)
@@ -1328,7 +1328,7 @@ static void analyze_misc(object_type *o_ptr, char *misc_desc)
 #ifdef JP
        sprintf(misc_desc, "¥ì¥Ù¥ë %u, ´õ¾¯ÅÙ %u, %d.%d kg, ¡ð%ld",
                a_ptr->level, a_ptr->rarity,
-               lbtokg1(a_ptr->weight), lbtokg2(a_ptr->weight), a_ptr->cost);
+               lbtokg1(a_ptr->weight), lbtokg2(a_ptr->weight), (long int)a_ptr->cost);
 #else
        sprintf(misc_desc, "Level %u, Rarity %u, %d.%d lbs, %ld Gold",
                a_ptr->level, a_ptr->rarity,