07-31-2006 09:06 AM
07-31-2006 11:25 AM - edited 07-31-2006 11:25 AM
If you are running under Debug, then your map[2] array will be initialised to 0, whereas the malloc() operation will give you memory initialised to garbage. Depending on the details of your structures/unions, you may be inadvertantly relying on, for example, high-order bytes of a word being 0 while you assign just the low order byte and then use the whole word as a parameter. Try using calloc() in place of malloc(), to initialise the dynamic memory to 0 as well.
JR
Message Edited by jr_2005 on 07-31-2006 05:27 PM