Changeset 11
- Timestamp:
- 03/25/07 09:42:43 (2 years ago)
- Files:
-
- trunk/src/birth.c (modified) (1 diff)
- trunk/src/load.c (modified) (2 diffs)
- trunk/src/main-ami.c (modified) (9 diffs)
- trunk/src/main-lfb.c (modified) (4 diffs)
- trunk/src/object1.c (modified) (4 diffs)
- trunk/src/save.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/birth.c
r1 r11 1415 1415 1416 1416 /* Hack -- add a fake slash */ 1417 strcat(inp, "/");1417 my_strcat(inp, "/", sizeof(inp)); 1418 1418 1419 1419 /* Hack -- look for the "slash" */ trunk/src/load.c
r1 r11 2119 2119 /* Extract name of lock file */ 2120 2120 my_strcpy(temp, savefile, sizeof(temp)); 2121 strcat(temp, ".lok");2121 my_strcat(temp, ".lok", sizeof(temp)); 2122 2122 2123 2123 /* Grab permissions */ … … 2333 2333 /* Extract name of lock file */ 2334 2334 my_strcpy(temp, savefile, sizeof(temp)); 2335 strcat(temp, ".lok");2335 my_strcat(temp, ".lok", sizeof(temp)); 2336 2336 2337 2337 /* Grab permissions */ trunk/src/main-ami.c
r1 r11 537 537 static int read_enhanced_palette ( void ); 538 538 static int read_normal_palette(void); 539 static char *handle_font(struct term_data *td, char *fontname );539 static char *handle_font(struct term_data *td, char *fontname, size_t fontname_size); 540 540 ULONG trans ( byte g ); 541 541 int create_menus ( void ); … … 909 909 { 910 910 /* Make sure the font name ends with .font */ 911 if ( !strstr( ts->fontname, ".font"))912 strcat( ts->fontname, ".font");911 if (!strstr(ts->fontname, ".font")) 912 my_strcat(ts->fontname, ".font", sizeof(ts->fontname)); 913 913 914 914 /* Set font attributes */ … … 2204 2204 strcpy(fontname,param); 2205 2205 2206 s = handle_font(td, fontname );2206 s = handle_font(td, fontname, sizeof(fontname)); 2207 2207 if (s) 2208 2208 puts(s); … … 2228 2228 } 2229 2229 2230 static char *handle_font(struct term_data *td, char *fontname )2230 static char *handle_font(struct term_data *td, char *fontname, size_t fontname_size) 2231 2231 { 2232 2232 static char error[128]; … … 2258 2258 return NULL; 2259 2259 } 2260 else2260 else 2261 2261 { 2262 2262 /* Find font name/size delimiter */ … … 2281 2281 2282 2282 /* Make sure the font name ends with .font */ 2283 if ( !strstr( fontname, ".font"))2284 strcat( fontname, ".font");2283 if (!strstr(fontname, ".font")) 2284 my_strcat(fontname, ".font", fontname_size); 2285 2285 2286 2286 /* Set font attributes */ … … 3200 3200 3201 3201 request_font(fontname); 3202 handle_font(td, fontname );3202 handle_font(td, fontname, sizeof(fontname)); 3203 3203 3204 3204 SetFont(td->rp, td->font); … … 4929 4929 c = temp2[strlen(temp2) - 1]; 4930 4930 if (c != '/' && c != ':') 4931 strcat(temp2,"/");4931 my_strcat(temp2, "/", sizeof(temp2)); 4932 4932 strcpy(name, temp2); 4933 4933 return; … … 5099 5099 5100 5100 /* Append a "maximum level" */ 5101 if (mdun > cdun) strcat(temp, format(" (Max %d)", mdun));5101 if (mdun > cdun) my_strcat(temp, format(" (Max %d)", mdun), sizeof(temp)); 5102 5102 5103 5103 /* Dump the info */ trunk/src/main-lfb.c
r4 r11 922 922 923 923 path_build(path, sizeof(path), ANGBAND_DIR_XTRA_FONT, buf); 924 strcat(path, ".bmp");924 my_strcat(path, ".bmp", sizeof(path)); 925 925 926 926 /* … … 931 931 { 932 932 path_build(path, sizeof(path), ANGBAND_DIR_XTRA_FONT, fb_font); 933 strcat(path, ".bmp");933 my_strcat(path, ".bmp", sizeof(path)); 934 934 935 935 if (fb_read_font(path, FALSE)) exit_game_panic(); … … 943 943 { 944 944 path_build(path, sizeof(path), ANGBAND_DIR_XTRA_FONT, fb_font); 945 strcat(path, ".bmp");945 my_strcat(path, ".bmp", sizeof(path)); 946 946 947 947 if (fb_read_font(path, FALSE)) exit_game_panic(); … … 1534 1534 /* Load the font */ 1535 1535 path_build(path, sizeof(path), ANGBAND_DIR_XTRA_FONT, fb_font); 1536 strcat(path, ".bmp");1536 my_strcat(path, ".bmp", sizeof(path)); 1537 1537 fb_read_font(path, TRUE); 1538 1538 trunk/src/object1.c
r1 r11 233 233 234 234 /* Add a space */ 235 strcat(buf, " ");235 my_strcat(buf, " ", sizeof(buf)); 236 236 237 237 /* Add the word */ … … 3032 3032 3033 3033 /* Indicate ability to "view" */ 3034 if (!p_ptr->command_see) strcat(out_val, " * to see,");3034 if (!p_ptr->command_see) my_strcat(out_val, " * to see,", sizeof(out_val)); 3035 3035 3036 3036 /* Indicate legality of "toggle" */ 3037 if (use_equip) strcat(out_val, " / for Equip,");3037 if (use_equip) my_strcat(out_val, " / for Equip,", sizeof(out_val)); 3038 3038 3039 3039 /* Indicate legality of the "floor" */ 3040 if (allow_floor) strcat(out_val, " - for floor,");3040 if (allow_floor) my_strcat(out_val, " - for floor,", sizeof(out_val)); 3041 3041 } 3042 3042 … … 3062 3062 3063 3063 /* Indicate ability to "view" */ 3064 if (!p_ptr->command_see) strcat(out_val, " * to see,");3064 if (!p_ptr->command_see) my_strcat(out_val, " * to see,", sizeof(out_val)); 3065 3065 3066 3066 /* Indicate legality of "toggle" */ 3067 if (use_inven) strcat(out_val, " / for Inven,");3067 if (use_inven) my_strcat(out_val, " / for Inven,", sizeof(out_val)); 3068 3068 3069 3069 /* Indicate legality of the "floor" */ 3070 if (allow_floor) strcat(out_val, " - for floor,");3070 if (allow_floor) my_strcat(out_val, " - for floor,", sizeof(out_val)); 3071 3071 } 3072 3072 … … 3091 3091 3092 3092 /* Indicate ability to "view" */ 3093 if (!p_ptr->command_see) strcat(out_val, " * to see,");3093 if (!p_ptr->command_see) my_strcat(out_val, " * to see,", sizeof(out_val)); 3094 3094 3095 3095 /* Append */ 3096 if (use_inven) strcat(out_val, " / for Inven,");3096 if (use_inven) my_strcat(out_val, " / for Inven,", sizeof(out_val)); 3097 3097 3098 3098 /* Append */ 3099 else if (use_equip) strcat(out_val, " / for Equip,");3099 else if (use_equip) my_strcat(out_val, " / for Equip,", sizeof(out_val)); 3100 3100 } 3101 3101 3102 3102 /* Finish the prompt */ 3103 strcat(out_val, " ESC");3103 my_strcat(out_val, " ESC", sizeof(out_val)); 3104 3104 3105 3105 /* Build the prompt */ trunk/src/save.c
r1 r11 1680 1680 /* New savefile */ 1681 1681 my_strcpy(safe, savefile, sizeof(safe)); 1682 strcat(safe, ".new");1682 my_strcat(safe, ".new", sizeof(safe)); 1683 1683 1684 1684 /* Grab permissions */ … … 1698 1698 /* Old savefile */ 1699 1699 my_strcpy(temp, savefile, sizeof(temp)); 1700 strcat(temp, ".old");1700 my_strcat(temp, ".old", sizeof(temp)); 1701 1701 1702 1702 /* Grab permissions */ … … 1725 1725 /* Lock on savefile */ 1726 1726 my_strcpy(temp, savefile, sizeof(temp)); 1727 strcat(temp, ".lok");1727 my_strcat(temp, ".lok", sizeof(temp)); 1728 1728 1729 1729 /* Grab permissions */
