aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src/libicalss/icalfileset.c
diff options
context:
space:
mode:
Diffstat (limited to 'libical/src/libicalss/icalfileset.c')
-rw-r--r--libical/src/libicalss/icalfileset.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libical/src/libicalss/icalfileset.c b/libical/src/libicalss/icalfileset.c
index 52dbc0beda..2ef38ff876 100644
--- a/libical/src/libicalss/icalfileset.c
+++ b/libical/src/libicalss/icalfileset.c
@@ -135,11 +135,12 @@ char* icalfileset_read_from_file(char *s, size_t size, void *d)
for(p=s; p<s+size-1;p++){
if(read(fd,p,1) != 1 || *p=='\n'){
- break;
+ p++;
+ break;
}
}
- *(++p) = '\0';
+ *p = '\0';
if(*s == 0){
return 0;