Oberon Community Platform Forum
December 12, 2019, 08:53:52 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: One more error in ZipInflate  (Read 3403 times)
Stierlitz
Newbie
*
Posts: 3


« on: October 26, 2008, 07:41:07 PM »

Bug in
PROCEDURE NeedOut (VAR s: Stream; VAR wavail: LONGINT): BOOLEAN;
   BEGIN
      IF wavail = 0 THEN
         IF (s.write = WindowSize) & (s.read # 0) THEN
            s.write := 0; wavail := s.read-1
         END;
         IF wavail = 0 THEN
            Flush(s);
                                (*Need add the following code. Start*)
                      IF s.write < s.read THEN wavail := s.read - s.write - 1
                          ELSE wavail := WindowSize - s.write
                      END;
                                (*End*)
            IF (s.write = WindowSize) & (s.read # 0) THEN
               s.write := 0; wavail := s.read-1;
            END;
         END
      END;
      RETURN wavail # 0
   END NeedOut;

   
Otherwise, the function PROCEDURE Uncompress* (...) performed with errors, if data length> 32768

P.S. Removed superfluous RETURN, thanks Info21
« Last Edit: October 28, 2008, 01:21:38 AM by Stierlitz » Logged
staubesv
Administrator
Sr. Member
*****
Posts: 387



« Reply #1 on: October 27, 2008, 04:54:39 PM »

In revision 1645. Thanks!
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!