[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Just found that exists() and file_exists() have no ASSERTs to check if I
passed NULL or not as argument. Turns out it crashed VC. Well, here's
the patch for it.
C:\DJGPP\> patch -p0 < file.diff
--
- Robert J Ohannessian
--- /cvs/allegro/src/file.c Sat Jul 29 06:18:44 2000
+++ allegro/src/file.c Mon Dec 11 13:58:40 2000
@@ -651,6 +651,7 @@
int file_exists(AL_CONST char *filename, int attrib, int *aret)
{
int a;
+ ASSERT(filename);
if (ustrchr(filename, '#')) {
PACKFILE *f = pack_fopen_special_file(filename, F_READ);
@@ -683,6 +684,7 @@
*/
int exists(AL_CONST char *filename)
{
+ ASSERT(filename);
return file_exists(filename, FA_ARCH | FA_RDONLY, NULL);
}