??? 08/21/05 18:44 Read: times |
#99785 - buff[] is auto, not static Responding to: ???'s previous message |
tostr() returns the address of buff[], which has a "lifespan" of only the duration while tostr() is executing. Once tostr() returns, the memory used for buff[] is subject to being overlaid by other data objects. Either define buff[] to be static, or pass the address of a buffer for tostr() to work with as a parameter. |
Topic | Author | Date |
Keil C51-optimization & Pointers | 01/01/70 00:00 | |
Bad array index | 01/01/70 00:00 | |
oops!! | 01/01/70 00:00 | |
buff[] is auto, not static | 01/01/70 00:00 | |
Back to basics | 01/01/70 00:00 | |
Don't shoot the pianist! | 01/01/70 00:00 | |
Hex file size | 01/01/70 00:00 | |
Optimization pointers | 01/01/70 00:00 | |
sprintf() is fairly large | 01/01/70 00:00 | |
So start a new thread, then! | 01/01/70 00:00 | |
pls...help | 01/01/70 00:00 | |
I disagree![]() | 01/01/70 00:00 | |
My dear Watson ! | 01/01/70 00:00 | |
One size fits all | 01/01/70 00:00 | |
bin = hex / 2.8 | 01/01/70 00:00 | |
hexmap | 01/01/70 00:00 | |
A bit of a sweeping generalisation!! | 01/01/70 00:00 | |
Keil C51-optimization & Pointers | 01/01/70 00:00 |