It seems that use of twstrim is dangerous after all...

This commit is contained in:
Vedran Ljubovic 2006-08-26 17:07:23 +00:00
parent 02fd5fcfd6
commit dbdc0decd4

View File

@ -813,7 +813,10 @@ void Config_Section::add_entry(const char* key, const char* value)
if(!value) return; if(!value) return;
char *kvpair; char *kvpair;
asprintf(&kvpair,"%s=%s",twstrim(key),twstrim(value)); char *m_key = wstrim(strdup(key));
char *m_value = wstrim(strdup(value));
asprintf(&kvpair,"%s=%s",m_key,m_value);
free (m_key); free (m_value);
// if key already exists, delete // if key already exists, delete
bool found = false; bool found = false;