equal
deleted
inserted
replaced
202 StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid_to_add, bool new_scheme, const char *text_to_add, StringID def_string) |
202 StringID AddGRFString(uint32 grfid, uint16 stringid, byte langid_to_add, bool new_scheme, const char *text_to_add, StringID def_string) |
203 { |
203 { |
204 GRFText *newtext; |
204 GRFText *newtext; |
205 uint id; |
205 uint id; |
206 |
206 |
|
207 /* We do not allow strings of only one char or even fewer*/ |
|
208 if (strlen(text_to_add) <= 1) return STR_EMPTY; |
|
209 |
207 /* When working with the old language scheme (grf_version is less than 7) and |
210 /* When working with the old language scheme (grf_version is less than 7) and |
208 * English or American is among the set bits, simply add it as English in |
211 * English or American is among the set bits, simply add it as English in |
209 * the new scheme, i.e. as langid = 1. |
212 * the new scheme, i.e. as langid = 1. |
210 * If English is set, it is pretty safe to assume the translations are not |
213 * If English is set, it is pretty safe to assume the translations are not |
211 * actually translated. |
214 * actually translated. |