Hi,

I notice sometimes that obexapp backsteps to the end of the previous line
after it has finished, because of an extraneous backspace..  I traced this
to an arithmetic error in obexapp_event_progress() function, as spinner[]
array has 5 characters plus a terminating NUL character, so sizeof = 6.

patch attached to fix this

regards,
iain
--- event.c.orig        2009-08-20 22:57:18.000000000 +0100
+++ event.c     2010-10-19 12:25:55.000000000 +0100
@@ -137,7 +137,7 @@ obexapp_event_progress(obex_t *handle, _
                static uint32_t spinner_idx = 0;
 
                printf("%c\b", spinner[spinner_idx ++]);
-               if (spinner_idx >= sizeof(spinner)/sizeof(spinner[0]))
+               if (spinner_idx == (sizeof(spinner)/sizeof(spinner[0]) - 1))
                        spinner_idx = 0;
        }
 } /* obexapp_event_progress */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth
To unsubscribe, send any mail to "[email protected]"

Reply via email to