Skip to content
This repository
Browse code

fix issue #13 - fwrite to stdout fails if data large

  • Loading branch information...
commit 488ea049b113cba00d1b5ef629b79c089177de29 1 parent 994a7b5
Henry Rawas authored August 07, 2012

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  src/redis-cli.c
5  src/redis-cli.c
@@ -527,7 +527,12 @@ static int cliReadReply(int output_raw_strings) {
527 527
                 out = sdscat(out,"\n");
528 528
             }
529 529
         }
  530
+#ifdef _WIN32
  531
+        /* if size is too large, fwrite fails. Use fprintf */
  532
+        fprintf(stdout, "%s", out);
  533
+#else
530 534
         fwrite(out,sdslen(out),1,stdout);
  535
+#endif
531 536
         sdsfree(out);
532 537
     }
533 538
     freeReplyObject(reply);

0 notes on commit 488ea04

Please sign in to comment.
Something went wrong with that request. Please try again.