From: "druid" <[EMAIL PROTECTED]> > I tried you code change and it does work > Now for the wierd thing > > I added this > > StrCopy(text, "UNKNOWN"); > } > now if I dont fill in any of the fields and it writes this to > the record, the very first field has the first three characters > cut off > "OWN","UNKNOWN","Select","", > Hmm, that's the first four characters which is significant because it's the size of a long int, suggesting that a char pointer has been offset by one (stack corruption, mishandled pointer or something strange about the way the constant is being stored). It's difficult to say why this might work for good data and fail for the constant.
Try checking to see if the data *before* the first field has been overwritten (generally requiring some work with the debugger or a hex editor). You want to know whether the full text has been written to an address four bytes before the start of the field or whether the start of the constant is wrong by four bytes but the data has been written to the wrong location. There are some compiler settings for how constants are handled but I wouldn't have thought they'd cause this sort of problem. Chris Tutty -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
