Hi
I was just playing with fcl examples and I found one bug in inc/streams.inc and A LOT of bugs in win32/fileinfo.pp. Bug in inc/streams.inc concerned the TStringStream class (I guess noone is using this class for anything so this bug was not noticed). And unit fileinfo.pp was totally unusable since these bugs prevented it from returning ANY version information info.
I corrected these bugs. Sorry, I'm unable to generate diffs so I will simply give here instructions on how to correct the bug in streams.inc and I'm attaching corrected version of fileinfo.pp. I found these bugs while compiling programs with FPC 1.0.10, FPC 1.1 is totally unstable on my win32 and linux so I wasn't able to actually _see_ these bugs in FPC 1.1. But I see that streams.inc and fileinfo.pp sources are exactly the same for FPC 1.0.10 and 1.1 so I'm pretty sure that these things should be corrected in FPC 1.1 in the same way.
Here is how to correct streams.inc bug: line 713 in inc/streams.inc ("ReadString:='';") should be REMOVED (this line is pure nonsense, it prevents method TStringStream.ReadString from returning correct result).
There were so many bugs and memory leaks in fileinfo.pp that I'm simply attaching to this letter corrected version of the file. I put some comments at the beginning of this file describing what I changed/added.
I hope these corrections will be applied to fpc 1.1. And anyone of you that is using stable version, 1.0.10 and wants to use TStringStream or TFileVersionInfo classes from FCL should probably apply these corrections to his FPC 1.0.10 too.
Regards,
