X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8cabab2212c60733053696558fe70447e8c421c9..a1242a2bc911c3188adccdc7b719cf8d8fa21f8c:/src/xbt/xbt_str.c diff --git a/src/xbt/xbt_str.c b/src/xbt/xbt_str.c index a3add85b90..fc0b7ff4db 100644 --- a/src/xbt/xbt_str.c +++ b/src/xbt/xbt_str.c @@ -709,8 +709,8 @@ char* xbt_str_from_file(FILE *file) { memset(bread,0,1024); while (!feof(file)) { - fread(bread, 1, 1023, file); - bread[1023] = '\0'; + int got = fread(bread, 1, 1023, file); + bread[got] = '\0'; xbt_strbuff_append(buff,bread); }