freebsd-ports/games/warzone2100/files/patch-src_loadsave.c
Simon Barner c360df4eb3 - Fix segmentation fault (it was calling "closedir()" with a NULL pointer
as an argument, in Linux "closedir()" ignores it, but in
  FreeBSD it crashes).
- Fix wrapper script (arguments weren't passed to the real executable).
- Bump port revision

Submitted by:	Alejandro Pulver <alejandro@varnet.biz> (maintainer)
PR:		ports/86480
2005-09-23 08:44:48 +00:00

22 lines
323 B
C

--- src/loadsave.c.orig Wed Jul 27 13:33:56 2005
+++ src/loadsave.c Thu Sep 22 15:40:54 2005
@@ -341,7 +341,8 @@
}
}
}
- closedir(d);
+ if (d)
+ closedir(d);
}
#endif
bLoadSaveUp = TRUE;
@@ -444,7 +445,8 @@
DeleteFile(entry->d_name);
}
- closedir(d);
+ if (d)
+ closedir(d);
}
#endif