diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-04-22 01:58:23 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-04-22 01:58:23 +0200 |
commit | 36a59f0d21f8b32fd1095b14d523f99a76cff726 (patch) | |
tree | 283726a8fde89dcd323b9ed9456c5ab716793b7d | |
parent | Fix DTEND of timezoned events. (diff) | |
download | calp-36a59f0d21f8b32fd1095b14d523f99a76cff726.tar.gz calp-36a59f0d21f8b32fd1095b14d523f99a76cff726.tar.xz |
Remove trailing newline from color.
Diffstat (limited to '')
-rw-r--r-- | src/calendar.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/calendar.c b/src/calendar.c index 5ec2b91d..b437d98d 100644 --- a/src/calendar.c +++ b/src/calendar.c @@ -85,6 +85,9 @@ int handle_dir(vcomponent* cal, char* path) { if (strcmp (d->d_name, "color") == 0) { f = fopen(resolved_path, "r"); fgets(info_buf, 0x100, f); + if (info_buf[strlen(info_buf) - 1] == '\n') + info_buf[strlen(info_buf) - 1] = '\0'; + fclose(f); vcomponent_push_val(cal, "COLOR", info_buf); } else if (strcmp (d->d_name, "displayname") == 0) { |