Let me try this,

'mm' is the initial address of the string.  You are passing the address to
"UpdataFieldStr", which treats it as integer (ULong) and translats it into a
string.  Although you are only assigning mm[0] and mm[1], the address is 32
bits.  So you got the chance that it blows up something.

It is weird that it worked as you claimed the first place.

Max
--- Dave Mottorn <[EMAIL PROTECTED]> wrote:

> void UpdateFieldStr(ULong newtime, ULong fieldname){
......
>       char temp[10];
......
>       StrIToA(fldptr, newtime);
......
> *****************************************************************
> 
>       This is the code that calls it.
> 
......
>     char mm[5], dd[5], yy[9], datestr[15];
>               DateTimeType CurrentTime;
>               ULong   CurrentSeconds;
......
> 
>                       mm[0] = datestr[0];
>                       mm[1] = datestr[1];
>                       mm[2] = '\0';
>                       dd[0] = datestr[2];
>                       dd[1] = datestr[3];
>                       dd[2] = '\0';
>                       yy[0] = datestr[6];
>                       yy[1] = datestr[7];
>                       yy[2] = '\0';
> 
> //                    it works ok up to here
> 
>                       UpdateFieldStr(mm, MainFilemmField);  <- this is where it 
>blows up the
> second time through


__________________________________________________
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to