]> git.cworth.org Git - apitrace/blobdiff - thirdparty/snappy/snappy-test.h
Update snappy to version 1.0.5.
[apitrace] / thirdparty / snappy / snappy-test.h
index 649f26e7ac1fd2608aeb23f93bf7ab8101525829..ef6a95539d1e454091f5a9be82f2d84b62073a79 100644 (file)
@@ -135,7 +135,7 @@ namespace File {
     while (!feof(fp)) {
       char buf[4096];
       size_t ret = fread(buf, 1, 4096, fp);
-      if (ret == -1) {
+      if (ret == 0 && ferror(fp)) {
         perror("fread");
         exit(1);
       }