From 4d06643fdb079e88a615b66c953ed68d039c74c6 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on Windows)" <rob@synchro.net>
Date: Mon, 25 Sep 2023 16:34:23 -0700
Subject: [PATCH] Allow text strings to be identified by number (instead of ID)

for those that want to use cryptic numbers rather than human-readable names.
---
 src/sbbs3/load_cfg.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/sbbs3/load_cfg.c b/src/sbbs3/load_cfg.c
index 19f72b20a2..6ca8577f0f 100644
--- a/src/sbbs3/load_cfg.c
+++ b/src/sbbs3/load_cfg.c
@@ -41,6 +41,8 @@ char *	readtext(long *line, FILE *stream, long dflt);
 int get_text_num(const char* id)
 {
 	int i;
+	if (isdigit(*id))
+		return atoi(id);
 	for (i = 0; i < TOTAL_TEXT; ++i)
 		if (strcmp(text_id[i], id) == 0)
 			break;
-- 
GitLab