paragui-cvs
[Top][All Lists]
Advanced

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

[paragui-cvs] CVS: paragui/src/core pgfilearchive.cpp,1.2.4.5,1.2.4.6 ph


From: Alexander Pipelka <address@hidden>
Subject: [paragui-cvs] CVS: paragui/src/core pgfilearchive.cpp,1.2.4.5,1.2.4.6 physfsrwops.cpp,1.1.2.1,1.1.2.2
Date: Thu, 18 Jul 2002 03:24:16 -0400

Update of /cvsroot/paragui/paragui/src/core
In directory subversions:/tmp/cvs-serv18761/src/core

Modified Files:
      Tag: devel-1-0
        pgfilearchive.cpp physfsrwops.cpp 
Log Message:
fixed a potential crash in PG_FileArchive::LoadSurface
updated PhysFS



Index: pgfilearchive.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgfilearchive.cpp,v
retrieving revision 1.2.4.5
retrieving revision 1.2.4.6
diff -C2 -r1.2.4.5 -r1.2.4.6
*** pgfilearchive.cpp   7 Jun 2002 07:29:30 -0000       1.2.4.5
--- pgfilearchive.cpp   18 Jul 2002 07:24:14 -0000      1.2.4.6
***************
*** 280,284 ****
  
        if(rw == NULL) {
!               PG_LogWRN("Unable to load '%s' !", filename);
                return NULL;
        }
--- 280,285 ----
  
        if(rw == NULL) {
!               PG_LogWRN("Unable to open '%s' !", filename);
!               PG_LogERR("PhysFS reported: '%s'", 
PG_FileArchive::GetLastError());
                return NULL;
        }
***************
*** 289,292 ****
--- 290,299 ----
        surface = SDL_LoadBMP_RW(rw, 1);
  #endif
+       
+       if(surface == NULL) {
+               PG_LogERR("Unable to load imagedata from '%s'", filename);
+               PG_LogERR("PhysFS reported: '%s'", 
PG_FileArchive::GetLastError());
+               PG_LogERR("SDL reported: '%s'", SDL_GetError());
+       }
        
        if(convert && !PG_Application::GetGLMode()) {

Index: physfsrwops.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/Attic/physfsrwops.cpp,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -r1.1.2.1 -r1.1.2.2
*** physfsrwops.cpp     12 Jun 2002 15:16:21 -0000      1.1.2.1
--- physfsrwops.cpp     18 Jul 2002 07:24:14 -0000      1.1.2.2
***************
*** 100,104 ****
  {
      PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
!     PHYSFS_sint64 rc = PHYSFS_read(handle, ptr, size, maxnum);
      if (rc != maxnum)
      {
--- 100,105 ----
  {
      PHYSFS_file *handle = (PHYSFS_file *) rw->hidden.unknown.data1;
! //    PHYSFS_sint64 rc = PHYSFS_read(handle, ptr, size, maxnum);
!     PHYSFS_sint64 rc = PHYSFS_read(handle, ptr, maxnum, size);
      if (rc != maxnum)
      {




reply via email to

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