From 929495474f9cc099a83a4a884d85272791c5e7c3 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 15 Jun 2005 02:21:15 +0000 Subject: [PATCH] print a different fopen message if it failed git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5439 d7cf8633-e32d-0410-b094-e92efae38249 --- prvm_cmds.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/prvm_cmds.c b/prvm_cmds.c index c5c9879e..9930c331 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -1457,13 +1457,19 @@ void VM_fopen(void) VM_FILES[filenum] = FS_Open(va("data/%s", filename), modestring, false, false); if (VM_FILES[filenum] == NULL && mode == 0) VM_FILES[filenum] = FS_Open(va("%s", filename), modestring, false, false); - if (developer.integer) - Con_Printf("fopen: %s mode %s opened as #%i\n", filename, modestring, filenum); if (VM_FILES[filenum] == NULL) + { + if (developer.integer) + Con_Printf("fopen: %s mode %s failed\n", filename, modestring); PRVM_G_FLOAT(OFS_RETURN) = -1; + } else + { + if (developer.integer) + Con_Printf("fopen: %s mode %s opened as #%i\n", filename, modestring, filenum); PRVM_G_FLOAT(OFS_RETURN) = filenum; + } } /* -- 2.39.2