"LERNE Waffenloser Kampf" ohne Tilde

Ich mache mal Quotes um den String, wenn er ein Blank enthält.
This commit is contained in:
Enno Rehling 2005-06-17 08:50:59 +00:00
parent 026dde5f4a
commit 23ab322ee1
1 changed files with 12 additions and 2 deletions

View File

@ -187,14 +187,24 @@ create_data(keyword_t kwd, const char * s, const char * sptr, int lindex)
default: /* nur skill als Parameter, keine extras */
data = locale_array[lindex]->study_orders[sk];
if (data==NULL) {
const char * skname = skillname(sk, lang);
data = (order_data*)malloc(sizeof(order_data));
locale_array[lindex]->study_orders[sk] = data;
data->_keyword = kwd;
data->_lindex = lindex;
#ifdef SHORT_STRINGS
data->_str = strdup(skillname(sk, lang));
if (strchr(skname, ' ')!=NULL) {
sprintf(buf, "\"%s\"", skname);
data->_str = strdup(buf);
} else {
data->_str = strdup(skname);
}
#else
sprintf(buf, "%s %s", LOC(lang, keywords[kwd]), skillname(sk, lang));
if (strchr(skname, ' ')!=NULL) {
sprintf(buf, "%s \"%s\"", LOC(lang, keywords[kwd]), skname);
} else {
sprintf(buf, "%s %s", LOC(lang, keywords[kwd]), skname);
}
data->_str = strdup(buf);
#endif
data->_refcount = 1;