summaryrefslogtreecommitdiff
path: root/newgrf_text.c
diff options
context:
space:
mode:
Diffstat (limited to 'newgrf_text.c')
-rw-r--r--newgrf_text.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/newgrf_text.c b/newgrf_text.c
index 15a3a27ff..00426767a 100644
--- a/newgrf_text.c
+++ b/newgrf_text.c
@@ -204,6 +204,9 @@ StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid_to_add, bool ne
GRFText *newtext;
uint id;
+ /* We do not allow strings of only one char or even fewer*/
+ if (strlen(text_to_add) <= 1) return STR_EMPTY;
+
/* When working with the old language scheme (grf_version is less than 7) and
* English or American is among the set bits, simply add it as English in
* the new scheme, i.e. as langid = 1.