samrajaf / pinguino32

Automatically exported from code.google.com/p/pinguino32
0 stars 1 forks source link

CDC.printf produces wrong results with any arguments outside the format string #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Any Pinguino32 program using CDC.printf or related functions
2. Ex. CDC.printf ("The numberis %d",100);

What is the expected output? What do you see instead?

I Should see "The number is 100" 
I am getting "The number is -1610580020"

This behavior occurs with all types (float, etc..) tested

What version of the product are you using? On what operating system?
Pinguino X.3 rev 294
Lubuntu 11.10 (Oneiric)

Please provide any additional information below.

Original issue reported on code.google.com by augustoc...@gmail.com on 4 Mar 2012 at 10:19

GoogleCodeExporter commented 8 years ago
Hi Augusto,
I tested some CDC examples with Olimex Pinguino32 OTG, and this works fine.

Can you post the code?
Are you Linux 64bits?

Original comment by anunakin on 5 Mar 2012 at 5:56

GoogleCodeExporter commented 8 years ago
This was solved in r296. Regis posted on this on the Pinguino Forum

The original code was basically (putitng aside any other stuff in the code)

printf ("%d",100);

(Actually didnt matter what you put as arguments - anything outside the
string would give meaningless output)

Thanks/Obrigado!

Augusto

Original comment by augustoc...@gmail.com on 5 Mar 2012 at 6:05

GoogleCodeExporter commented 8 years ago
Fixed by Regis.

Original comment by anunakin on 5 Mar 2012 at 6:07