@@ -1052,7 +1052,7 @@ static HWND Player_stats[MAX_PLAYER_STAT_FIELDS]; // text boxes for player allt
10521052static HWND Player_mstats[MAX_PLAYER_STAT_FIELDS]; // text boxes for player mission statistics info
10531053
10541054// sprintf and set window text to the passed int
1055- #define STD_ADDSTRING (hwnd,val ) { snprintf (txt,sizeof (txt)- 1 ," %d" ,( int ) val); SetWindowText (hwnd,txt); }
1055+ #define STD_ADDSTRING (hwnd,val ) { snprintf (txt,sizeof (txt)," %d" ,sz2i ( val) ); SetWindowText (hwnd,txt); }
10561056
10571057// intialize all the controls in the player info tab
10581058void std_pinfo_init_player_info_controls ();
@@ -2036,17 +2036,17 @@ void std_build_title_string(char *str)
20362036 memset (ver_str, 0 , sizeof (ver_str));
20372037
20382038 if (FS_VERSION_BUILD == 0 && FS_VERSION_HAS_REVIS == 0 ) { // -V547
2039- snprintf (ver_str, sizeof (ver_str)- 1 , " %i.%i" , FS_VERSION_MAJOR, FS_VERSION_MINOR);
2039+ snprintf (ver_str, sizeof (ver_str), " %i.%i" , FS_VERSION_MAJOR, FS_VERSION_MINOR);
20402040 } else if (FS_VERSION_HAS_REVIS == 0 ) {
2041- snprintf (ver_str, sizeof (ver_str)- 1 , " %i.%i.%i" , FS_VERSION_MAJOR, FS_VERSION_MINOR, FS_VERSION_BUILD);
2041+ snprintf (ver_str, sizeof (ver_str), " %i.%i.%i" , FS_VERSION_MAJOR, FS_VERSION_MINOR, FS_VERSION_BUILD);
20422042 } else {
2043- snprintf (ver_str, sizeof (ver_str)- 1 , " %i.%i.%i.%i" , FS_VERSION_MAJOR, FS_VERSION_MINOR, FS_VERSION_BUILD, FS_VERSION_REVIS);
2043+ snprintf (ver_str, sizeof (ver_str), " %i.%i.%i.%i" , FS_VERSION_MAJOR, FS_VERSION_MINOR, FS_VERSION_BUILD, FS_VERSION_REVIS);
20442044 }
20452045
20462046 // now build the title
20472047 memset (temp, 0 , 256 );
20482048
2049- snprintf (temp, sizeof (temp)- 1 , " %s %s" , XSTR (" FreeSpace Standalone" , 935 ), ver_str);
2049+ snprintf (temp, sizeof (temp), " %s %s" , XSTR (" FreeSpace Standalone" , 935 ), ver_str);
20502050
20512051 // output first part
20522052 strcpy (str, temp);
@@ -2105,22 +2105,22 @@ static HMENU std_create_systray_menu()
21052105 HMENU stdPopup = CreatePopupMenu ();
21062106
21072107 // Type of connection:
2108- snprintf (tstr, sizeof (tstr)- 1 , " Connection Type: %s" , MULTI_IS_TRACKER_GAME ? " PXO" : " Local/IP" );
2108+ snprintf (tstr, sizeof (tstr), " Connection Type: %s" , MULTI_IS_TRACKER_GAME ? " PXO" : " Local/IP" );
21092109 AppendMenu (stdPopup, MF_STRING | MF_GRAYED, 0 , tstr);
21102110
21112111 // ----------------------------------------------
21122112 AppendMenu (stdPopup, MF_SEPARATOR, 0 , NULL );
21132113
21142114 // Game name:
2115- snprintf (tstr, sizeof (tstr)- 1 , " Name: %s" , Netgame.name );
2115+ snprintf (tstr, sizeof (tstr), " Name: %s" , Netgame.name );
21162116 AppendMenu (stdPopup, MF_STRING | MF_GRAYED, 0 , tstr);
21172117
21182118 // Mission name:
2119- snprintf (tstr, sizeof (tstr)- 1 , " Mission: %s" , strlen (Netgame.mission_name ) ? Netgame.mission_name : " <none>" );
2119+ snprintf (tstr, sizeof (tstr), " Mission: %s" , strlen (Netgame.mission_name ) ? Netgame.mission_name : " <none>" );
21202120 AppendMenu (stdPopup, MF_STRING | MF_GRAYED, 0 , tstr);
21212121
21222122 // Number of players:
2123- snprintf (tstr, sizeof (tstr)- 1 , " Num Players: %d" , multi_num_players ());
2123+ snprintf (tstr, sizeof (tstr), " Num Players: %d" , multi_num_players ());
21242124 AppendMenu (stdPopup, MF_STRING | MF_GRAYED, 0 , tstr);
21252125
21262126 // ----------------------------------------------
0 commit comments