From c4fdadddca6ccdd9e058ba3538afbdc2e9cc269b Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 21 Jan 2016 20:35:52 +0000 Subject: [PATCH] iniGet[Existing]String was not returning the trimmed value (stored in the value buffer, when supplied). Now, when a value buffer (non-NULL pointer) is supplied, we return a pointer to that buffer instead of the value in the string list (which is not trimmed). This was introduced in rev 1.120 (July 2011) as part of an optimization (optional value buffers). iniReadString() was not affected. --- src/xpdev/ini_file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xpdev/ini_file.c b/src/xpdev/ini_file.c index c0cf0a1326..e4354638c7 100644 --- a/src/xpdev/ini_file.c +++ b/src/xpdev/ini_file.c @@ -786,6 +786,9 @@ char* DLLCALL iniGetString(str_list_t list, const char* section, const char* key if(vp==NULL || *vp==0 /* blank value or missing key */) return default_value(deflt,value); + if(value != NULL) /* return the modified (trimmed) value */ + return value; + return(vp); } -- GitLab