Fix mistaken fwrite (should be fread)
authorChow Loong Jin <hyperair@debian.org>
Sun, 20 Mar 2016 12:35:51 +0000 (20:35 +0800)
committerChow Loong Jin <hyperair@debian.org>
Sun, 20 Mar 2016 12:35:51 +0000 (20:35 +0800)
src/modules/tools/zprobe/DeltaGridStrategy.cpp

index 17560b0..06fab1f 100644 (file)
@@ -192,7 +192,7 @@ bool DeltaGridStrategy::load_grid(StreamOutput *stream)
         return false;
     }
 
-    if(fwrite(&radius, sizeof(float), 1, fp) != 1) {
+    if(fread(&radius, sizeof(float), 1, fp) != 1) {
         stream->printf("error:Failed to read grid radius\n");
         fclose(fp);
         return false;