diff options
author | belugas <belugas@openttd.org> | 2006-09-01 02:56:02 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2006-09-01 02:56:02 +0000 |
commit | c05c81f35c70a95d4d528bdbc8da391b244da065 (patch) | |
tree | 14098c80266973a12af61bffed78d4012ee022fc /newgrf_text.c | |
parent | 718c0214bf69540326268bd03d9cd7e31a311ad4 (diff) | |
download | openttd-c05c81f35c70a95d4d528bdbc8da391b244da065.tar.xz |
(svn r6289) -Fix(r6108) : case 0x48 (generic text) should not have been set over newstations.
It grabbed everyting. Instead, we are now using ids for that purpose, 0xC9, oxD0, 0xDC (FS#304 by Osai)
- Protect newgrf text from entries of 1 char and fewer
- Protect currency name from an overrun of ids
Thanks to glx
Diffstat (limited to 'newgrf_text.c')
-rw-r--r-- | newgrf_text.c | 3 |
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. |