Fgetc() return an int to clearly detect EOF. If you want to read more about it:
http://stackoverflow.com/questions/
11057259/fgetc-checking-eof
SVN revision: 83829
file_read(const char *file_name, char **buffer)
{
FILE *xml_handler;
- char data;
+ int data; /* fgetc needs int to detect EOF correctly */
Eina_Strbuf *buf;
xml_handler = fopen(file_name, "rt");
buf = eina_strbuf_new();
while ((data = fgetc(xml_handler)) != EOF)
- eina_strbuf_append_char(buf, data);
+ eina_strbuf_append_char(buf, (char)data);
fclose(xml_handler);
*buffer = eina_strbuf_string_steal(buf);