RTC Forums
May 08, 2024, 10:46:17 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: [1]
  Print  
Author Topic: TRtcFileStream bug?  (Read 3359 times)
xalion
RTC Expired
*
Posts: 6


« on: February 25, 2013, 09:07:33 AM »

I use TRtcFileStream,
but I foung function TRtcFileStream.ReadEx(Size: int64): RtcByteArray can't read anything.
and I checked the code :
Code:
function TRtcFileStream.ReadEx(Size: int64): RtcByteArray;
  var
    sRead:int64;
  begin
  if f=RTC_INVALID_FILE_HDL then
    raise ERtcInfo.Create('File not open.')
  else
    begin
    if Size<0 then
      begin
      Size:=FileSeek(f,int64(0),2)-L;
      fileseek(f,L,0);  ------------------------------------> this line added
      end;
    SetLength(Result,Size);
    sRead:=FileRead(f,Result[0],Size);
    Inc(L,sRead);
    if sRead<Size then
      SetLength(Result,sRead);
    end;
  end;

I added the line, it now works fine.
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #1 on: February 26, 2013, 02:13:15 PM »

Thank you for reporting this problem.
RealThinClient SDK v6.08 has now been released to fix this issue.

Best Regards,
Danijel Tkalcec
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.022 seconds with 16 queries.