dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/image pecoff_writer.c,1.10,1.11


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/image pecoff_writer.c,1.10,1.11
Date: Sat, 08 Feb 2003 18:41:34 -0500

Update of /cvsroot/dotgnu-pnet/pnet/image
In directory subversions:/tmp/cvs-serv21592/image

Modified Files:
        pecoff_writer.c 
Log Message:


Fall back to the original back-patch logic if the stream was not opened
in a read-write mode.


Index: pecoff_writer.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/image/pecoff_writer.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** pecoff_writer.c     8 Feb 2003 04:24:29 -0000       1.10
--- pecoff_writer.c     8 Feb 2003 23:41:32 -0000       1.11
***************
*** 209,214 ****
                                         writer->stream) != 
(unsigned)(writer->backpatchLen))
                        {
!                               writer->writeFailed = 1;
!                               return;
                        }
                        writer->currSeek = writer->backpatchSeek + 
writer->backpatchLen;
--- 209,218 ----
                                         writer->stream) != 
(unsigned)(writer->backpatchLen))
                        {
!                               /* The stream may not have been opened in a 
read-write mode,
!                                  so fall back to the simple "seek and write" 
method */
!                               writer->currSeek = ~((unsigned long)0);
!                               ILFree(writer->backpatchBuf);
!                               writer->backpatchBuf = 0;
!                               goto fallback;
                        }
                        writer->currSeek = writer->backpatchSeek + 
writer->backpatchLen;
***************
*** 222,225 ****
--- 226,230 ----
  
                /* Seek back in the file and write the change */
+       fallback:
                if(posn != writer->currSeek)
                {





reply via email to

[Prev in Thread] Current Thread [Next in Thread]