Index: code/fred2/textviewdlg.cpp
===================================================================
--- code/fred2/textviewdlg.cpp	(revision 11150)
+++ code/fred2/textviewdlg.cpp	(working copy)
@@ -52,8 +52,7 @@
 {
 	char line[256], line2[256], file_text[82];
 	int i, j, n, found = 0, comment = 0, num_files = 0;
-	char tbl_file_arr[MAX_TBL_PARTS][MAX_FILENAME_LEN];
-	char *tbl_file_names[MAX_TBL_PARTS];
+	SCP_vector<SCP_string> tbl_file_names;
 	CFILE *fp;
 
 	if (ship_class < 0)
@@ -112,12 +111,12 @@
 
 
 	// done with ships.tbl, so now check all modular ship tables...
-	num_files = cf_get_file_list_preallocated(MAX_TBL_PARTS, tbl_file_arr, tbl_file_names, CF_TYPE_TABLES, NOX("*-shp.tbm"), CF_SORT_REVERSE);
+	num_files = cf_get_file_list(tbl_file_names, CF_TYPE_TABLES, NOX("*-shp.tbm"), CF_SORT_REVERSE);
 
 	for (n = 0; n < num_files; n++){
-		strcat(tbl_file_names[n], ".tbm");
+		tbl_file_names[n] += ".tbm";
 
-		fp = cfopen(tbl_file_names[n], "r");
+		fp = cfopen(tbl_file_names[n].c_str(), "r");
 		Assert(fp);
 
 		memset( line, 0, sizeof(line) );
@@ -160,7 +159,7 @@
 
 				if (!stricmp(line2 + i, Ship_info[ship_class].name)) {
 					memset( file_text, 0, sizeof(file_text) );
-					snprintf(file_text, sizeof(file_text)-1, "--  %s  -------------------------------\r\n", tbl_file_names[n]);
+					snprintf(file_text, sizeof(file_text)-1, "--  %s  -------------------------------\r\n", tbl_file_names[n].c_str());
 					m_edit += file_text;
 					found = 1;
 				}
Index: code/parse/parselo.cpp
===================================================================
--- code/parse/parselo.cpp	(revision 11150)
+++ code/parse/parselo.cpp	(working copy)
@@ -4369,23 +4369,22 @@
 // parse a modular table of type "name_check" and parse it using the specified function callback
 int parse_modular_table(const char *name_check, void (*parse_callback)(const char *filename), int path_type, int sort_type)
 {
-	char tbl_file_arr[MAX_TBL_PARTS][MAX_FILENAME_LEN];
-	char *tbl_file_names[MAX_TBL_PARTS];
+	SCP_vector<SCP_string> tbl_file_names;
 	int i, num_files = 0;
 
 	if ( (name_check == NULL) || (parse_callback == NULL) || ((*name_check) != '*') ) {
-		Int3();
+		Assertion(false, "parse_modular_table() called with invalid arguments; get a coder!\n");
 		return 0;
 	}
 
-	num_files = cf_get_file_list_preallocated(MAX_TBL_PARTS, tbl_file_arr, tbl_file_names, path_type, name_check, sort_type);
+	num_files = cf_get_file_list(tbl_file_names, path_type, name_check, sort_type);
 
 	Parsing_modular_table = true;
 
 	for (i = 0; i < num_files; i++){
-		strcat(tbl_file_names[i], ".tbm");
-		mprintf(("TBM  =>  Starting parse of '%s' ...\n", tbl_file_names[i]));
-		(*parse_callback)(tbl_file_names[i]);
+		tbl_file_names[i] += ".tbm";
+		mprintf(("TBM  =>  Starting parse of '%s' ...\n", tbl_file_names[i].c_str()));
+		(*parse_callback)(tbl_file_names[i].c_str());
 	}
 
 	Parsing_modular_table = false;
Index: code/parse/parselo.h
===================================================================
--- code/parse/parselo.h	(revision 11150)
+++ code/parse/parselo.h	(working copy)
@@ -49,10 +49,6 @@
 
 #define PARSE_BUF_SIZE			4096
 
-//For modular TBL files -C
-#define MAX_TBL_PARTS 32
-
-
 #define	SHIP_TYPE			0	// used to identify which kind of array to do a search for a name in
 #define	SHIP_INFO_TYPE		1
 #define	WEAPON_LIST_TYPE	2	//	to parse an int_list of weapons
