]> Joshua Wise's Git repositories - fpgaboy.git/blobdiff - binwire.c
Cut 1 at button integration
[fpgaboy.git] / binwire.c
index 101b5c10bf172d7d90d399f3d59fba7ee8872306..cef0924294a27630901af44fcb23142dc829f843 100644 (file)
--- a/binwire.c
+++ b/binwire.c
@@ -7,10 +7,13 @@
 
 void dowrite(char *s, int len)
 {
 
 void dowrite(char *s, int len)
 {
-  int i;
-  for (i=0; i<len; i++)
+  int i = 0;
+  while (i < len)
   {
   {
-    write(1, s+i, 1);
+    int cs = ((len-i) > 1) ? 1 : (len-i);
+    
+    write(1, s+i, cs);
+    i += cs;
   }
 }
 
   }
 }
 
This page took 0.024772 seconds and 4 git commands to generate.