I'm using a TList with some specific records and I'm running into a problem (TD2006). What I'm putting into it is something like this:
But when I get it out, I get messed up data in E, resulting in a floating-point exception. Now I tried tracing it through my code and noticed that E wasn't getting overwritten BEFORE I added the record, and even proved that by overwriting it with a uniform character before I started processing it. The curious part to me is that I can move E to any other position in the record and have it work absolutely properly with no indications that any data got corrupted at any point. When D is in the final position, I notice no data corruption whatsoever in that value.
I've run out of all the things I know to look for in my code (something overwriting the data beyond it's bounds, namely). Any thoughts on things to look at (as obviously there's something wrong somewhere if E in that position is getting corrupted)?
Code:
Myrecord = record
A: String[255];
B: String[255];
C: String[50];
D: String[50];
E: Extended;
end;
But when I get it out, I get messed up data in E, resulting in a floating-point exception. Now I tried tracing it through my code and noticed that E wasn't getting overwritten BEFORE I added the record, and even proved that by overwriting it with a uniform character before I started processing it. The curious part to me is that I can move E to any other position in the record and have it work absolutely properly with no indications that any data got corrupted at any point. When D is in the final position, I notice no data corruption whatsoever in that value.
I've run out of all the things I know to look for in my code (something overwriting the data beyond it's bounds, namely). Any thoughts on things to look at (as obviously there's something wrong somewhere if E in that position is getting corrupted)?