SomeRandomPerson / the-bus-pirate

Automatically exported from code.google.com/p/the-bus-pirate
Other
0 stars 1 forks source link

bpxsvfplayer utility has a major bug in serial initialization #64

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
You are passing a string! (uh..) to the serial_setup and to the cfsetispeed. 
That is very wrong and won't work (or at least shouldn't..).

The attached patch fixes it with simple atoi call and no error checking there I 
admit.

The result performs flawlessly on linux and Mac OS 10.6.

--- main.c.old  2011-10-03 00:00:44.000000000 +0200
+++ main.c.new  2011-10-03 00:01:44.000000000 +0200
@@ -183,7 +183,7 @@
        }

        //setup port and speed
-       serial_setup(fd,(speed_t) param_speed);
+       serial_setup(fd,(speed_t) atoi(param_speed));

        if (jtag_reset==TRUE){
         printf(" Performing Reset..\n");

Original issue reported on code.google.com by m...@montik.net on 2 Oct 2011 at 10:12

GoogleCodeExporter commented 8 years ago
committed, thanks!

Original comment by ianles...@gmail.com on 3 Oct 2011 at 6:11