aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ini.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ini.c b/src/ini.c
index f43beaa..8b50b31 100644
--- a/src/ini.c
+++ b/src/ini.c
@@ -401,7 +401,11 @@ struct INIFILE *ini_open(const char *filename) {
memset(key_last, 0, sizeof(inikey[1]));
strcpy(key_last, key);
reading_value = 1;
- strcpy(value, &operator[1]);
+ if (strlen(operator) > 1) {
+ strcpy(value, &operator[1]);
+ } else {
+ strcpy(value, "");
+ }
if (isempty(value)) {
//printf("%s is probably long raw data\n", key);
multiline_data = 1;